dragonflydb / dragonflydb/dragonfly
Make cluster migrations vector thread_local
Open
- Dominant language
- C++
- Stars
- 31.5k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 137
Description
Problem: we have a lot of methods that use a vector of migrations and because migrations can be removed we need to lock mutex migration_mu_ in all these methods
Solution: make the vector of migrations unchangeable. We already consider the slot migration process as part of the config, so we can use absolutely the same approach, as we use for config, for the vector of migrations and store it in the config or create a thread_local ptr for it.
Contributor guide
Assessment
This issue has not been assessed yet.