You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: we have a lot of methods that use a vector of migrations and because migrations can be removed we need to lock mutex 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. In this case, we don't need any synchronization to operate with migrations and use mutex only in the case when the config is updated (during DFLYCLUSTER CONFIG command and migration finalization).
Other improvements:
make the interface of incoming and outgoing migration more similar or even make an ancestor
make flush slots in one place for all migrations and config, during DFLYCLUSTER CONFIG command
instead of migration_mu_ we can use set_config_mu_ without any issues.
update streamer
refactor DflyClusterGetSlotInfo do simple atomic::add(relaxed) instead of a mutex
remove unused code:
auto host_ip = cntx->conn()->RemoteEndpointAddress();
#include
need to rewrite SlotRanges::Merge() because it is slow and call under mutex
move tl_cluster_config out of cluster_family into cluster_config
The text was updated successfully, but these errors were encountered:
Problem: we have a lot of methods that use a vector of migrations and because migrations can be removed we need to lock mutex 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. In this case, we don't need any synchronization to operate with migrations and use mutex only in the case when the config is updated (during DFLYCLUSTER CONFIG command and migration finalization).
Other improvements:
The text was updated successfully, but these errors were encountered: