Update clusterMoveNodeSlots to also move importing slots and migrating slots#2370
Conversation
…g slots Signed-off-by: Binbin <binloveplay1314@qq.com>
|
@PingXie Please take a look before we moving forward. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #2370 +/- ##
============================================
+ Coverage 71.30% 71.44% +0.13%
============================================
Files 123 123
Lines 67122 67156 +34
============================================
+ Hits 47859 47977 +118
+ Misses 19263 19179 -84
🚀 New features to boost your workflow:
|
|
A test log example: |
Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: Binbin <binloveplay1314@qq.com>
|
Hmm, after reading through #2363, I realize that we now have duplicated logic in two places |
ok the only minor thing is that the same logging statements in |
Signed-off-by: Binbin <binloveplay1314@qq.com>
…g slots (valkey-io#2370) In valkey-io#2301, we added clusterMoveNodeSlots to implement the logic of moving slots from old primary to new primary, when myself receives the replica (old primary) message first and the new primary message later in a shard failover. However due to this, when myself receives the new primary message later next time, there is no way to call clusterUpdateSlotsConfigWith, because we have already updated the slots of the new primary before. This result in, for example, importing slots and migrating slots not being updated, see valkey-io#445. In this commit, we also make clusterMoveNodeSlots to move importing slots and migrating slots. Fixes valkey-io#2363. Signed-off-by: Binbin <binloveplay1314@qq.com>
…g slots (valkey-io#2370) In valkey-io#2301, we added clusterMoveNodeSlots to implement the logic of moving slots from old primary to new primary, when myself receives the replica (old primary) message first and the new primary message later in a shard failover. However due to this, when myself receives the new primary message later next time, there is no way to call clusterUpdateSlotsConfigWith, because we have already updated the slots of the new primary before. This result in, for example, importing slots and migrating slots not being updated, see valkey-io#445. In this commit, we also make clusterMoveNodeSlots to move importing slots and migrating slots. Fixes valkey-io#2363. Signed-off-by: Binbin <binloveplay1314@qq.com> (cherry picked from commit a3907ad)
In #2301, we added clusterMoveNodeSlots to implement the logic of
moving slots from old primary to new primary, when myself receives
the replica (old primary) message first and the new primary message
later in a shard failover.
However due to this, when myself receives the new primary message
later next time, there is no way to call clusterUpdateSlotsConfigWith,
because we have already updated the slots of the new primary before.
This result in, for example, importing slots and migrating slots
not being updated, see #445.
In this commit, we also make clusterMoveNodeSlots to move importing
slots and migrating slots.
Fixes #2363.