Skip to content

Fix empty primary may have dirty slots data due to bad migration#1285

Merged
enjoy-binbin merged 2 commits intovalkey-io:unstablefrom
enjoy-binbin:fix_empty_primary
Nov 11, 2024
Merged

Fix empty primary may have dirty slots data due to bad migration#1285
enjoy-binbin merged 2 commits intovalkey-io:unstablefrom
enjoy-binbin:fix_empty_primary

Conversation

@enjoy-binbin
Copy link
Member

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node
forcibly executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node
forcibly executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
@enjoy-binbin enjoy-binbin requested review from PingXie and zuiderkwast and removed request for PingXie November 9, 2024 16:01
@codecov
Copy link

codecov bot commented Nov 9, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.52%. Comparing base (e972d56) to head (93f7268).
⚠️ Report is 643 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1285      +/-   ##
============================================
- Coverage     70.70%   70.52%   -0.19%     
============================================
  Files           114      114              
  Lines         63147    63149       +2     
============================================
- Hits          44648    44533     -115     
- Misses        18499    18616     +117     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.29% <100.00%> (+0.07%) ⬆️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another corner case covered. Nice!

@zuiderkwast zuiderkwast added the release-notes This issue should get a line item in the release notes label Nov 9, 2024
@enjoy-binbin enjoy-binbin merged commit 2df56d8 into valkey-io:unstable Nov 11, 2024
@enjoy-binbin enjoy-binbin deleted the fix_empty_primary branch November 11, 2024 14:13
zvi-code pushed a commit to zvi-code/valkey-z that referenced this pull request Nov 13, 2024
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
vitarb pushed a commit to vitarb/valkey that referenced this pull request Jun 24, 2025
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
vitarb pushed a commit to vitarb/valkey that referenced this pull request Jun 24, 2025
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
zuiderkwast pushed a commit to vitarb/valkey that referenced this pull request Aug 15, 2025
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
zuiderkwast pushed a commit to vitarb/valkey that referenced this pull request Aug 15, 2025
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
zuiderkwast pushed a commit to vitarb/valkey that referenced this pull request Aug 21, 2025
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
zuiderkwast pushed a commit that referenced this pull request Aug 22, 2025
If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/valkey that referenced this pull request Sep 16, 2025
…key-io#1285)

If we become an empty primary for some reason, we still need to
check if we need to delete dirty slots, because we may have dirty
slots data left over from a bad migration. Like the target node forcibly
executes CLUSTER SETSLOT NODE to take over the slot without
performing key migration.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cluster release-notes This issue should get a line item in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants