-
Notifications
You must be signed in to change notification settings - Fork 632
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
Replicate slot migration states via RDB aux fields #586
Conversation
Signed-off-by: Ping Xie <pingxie@google.com>
8ac5fee
to
97180e5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #586 +/- ##
============================================
- Coverage 70.20% 70.18% -0.02%
============================================
Files 110 110
Lines 60007 60042 +35
============================================
+ Hits 42130 42143 +13
- Misses 17877 17899 +22
|
Signed-off-by: Ping Xie <pingxie@google.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.
Looks pretty good to me, just some minor comments.
…l-slot-states-in-rdb
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
Signed-off-by: Ping Xie <pingxie@google.com>
…l-slot-states-in-rdb
Signed-off-by: Adva Moshkovitz <advamo7@gmail.com>
Aux fields are ignored when the RDB is loaded by an older version, right? We still need to do #421 for online replicas though, don't we? |
When we goto eoferr, we need to release the auxkey and auxval, this is a cleanup, also explicitly check that decoder return value is C_ERR. Introduced in valkey-io#586. Signed-off-by: Binbin <binloveplay1314@qq.com>
yes
i guess the answer is also yes. |
When we goto eoferr, we need to release the auxkey and auxval, this is a cleanup, also explicitly check that decoder return value is C_ERR. Introduced in #586. Signed-off-by: Binbin <binloveplay1314@qq.com>
Replicate slot migration states via RDB aux fields to eliminate the brief window of inconsistency that could break the high availability guarantee intended by #445. Previously, these states were replicated using explicit
CLUSTER SETSLOT
commands after full resync is completed, which was not only a hack but also created this window where a new replica can becomeonline
without knowing its primary's slot migration states.Additionally, this PR introduces a generic framework for extending RDB aux fields without strong coupling. Now other subsystems in the server, such as cluster bus, can inject aux fields into RDB without rdb.c taking a code dependency on them via hardcoded functions.
Fix #419