mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +00:00
fix: prevent starting migrations from replica (#3985)
This commit is contained in:
parent
79963f9a10
commit
0a62f6b6ba
1 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,9 @@ shared_ptr<ClusterConfig> ClusterConfig::CreateFromConfig(string_view my_id,
|
|||
[&](const ClusterNodeInfo& node) { return node.id == my_id; });
|
||||
if (owned_by_me) {
|
||||
result->my_slots_.Set(shard.slot_ranges, true);
|
||||
result->my_outgoing_migrations_ = shard.migrations;
|
||||
if (shard.master.id == my_id) {
|
||||
result->my_outgoing_migrations_ = shard.migrations;
|
||||
}
|
||||
} else {
|
||||
for (const auto& m : shard.migrations) {
|
||||
if (my_id == m.node_info.id) {
|
||||
|
|
Loading…
Reference in a new issue