-
Notifications
You must be signed in to change notification settings - Fork 952
Update clusterMoveNodeSlots to also move importing slots and migrating slots #2370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @enjoy-binbin
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.