-
Notifications
You must be signed in to change notification settings - Fork 955
Introduce atomic slot migration #1949
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
Merged
madolson
merged 125 commits into
valkey-io:unstable
from
enjoy-binbin:slot_migration_murphyjacob4
Aug 12, 2025
Merged
Changes from all commits
Commits
Show all changes
125 commits
Select commit
Hold shift + click to select a range
c7ba3bb
Implementation of the slot async move, part I
enjoy-binbin 219427b
Implementation of the slot async move, part II
enjoy-binbin c4993e2
Implementation of the slot async move, part III
enjoy-binbin a4f0dbe
Implementation of the slot async move, part IV
enjoy-binbin f78b62a
Implementation of the slot async move, part V
enjoy-binbin bc5c5bf
Implementation of the slot async move, part VI
enjoy-binbin 2a14b69
Implementation of the slot async move, part VII
enjoy-binbin 877f042
Support to inject errors in the slot async move
enjoy-binbin 9ce37d1
Add crstest cases for cluster slot async move
enjoy-binbin 655d102
Disable read slotsync data when rdb is loading
enjoy-binbin 9f2343d
Add new RDBFLAGS_SLOT_SYNC to allow loading the same function from sl…
enjoy-binbin 56e66c8
Fix replica data loss when master re-load a slot RDB
enjoy-binbin 8def8b5
Fix SET with expire time crash in resharding
enjoy-binbin e899194
Fix double free when sync connection close after cluster slotfailover
enjoy-binbin 0a43cc6
Disable expire during slot migration
enjoy-binbin 4593bb9
Try to run all tests
enjoy-binbin b96ad52
Fix the dummy primary client on the target side
enjoy-binbin 714cb30
Fix client post write issue
enjoy-binbin 900601e
Fix target node wrongly reset the slot failover
enjoy-binbin 5af2585
Fix slot sync test, make it can pass on Mac
enjoy-binbin dcf5cc7
Cleanup and format
enjoy-binbin e66525c
Minor cleanup around sync command
enjoy-binbin 5ef6157
Target node as a replica send REPLCONF listening-port so we can see it
enjoy-binbin 9b756bd
Set slotsync_slots default to NULL and add slot_sync_primary/replica …
enjoy-binbin 7aef44d
Only traverse the slot dicts instead of traversing the entir kvstore
enjoy-binbin b27aae1
Fix disk-based replication reusing slot RDB file
enjoy-binbin 49a51f1
Add assert to make sure we don't mess up the slot RDBs
enjoy-binbin cba2f94
Use bio to load the slot RDB
enjoy-binbin a8b2d85
Move client operations to the main thread
enjoy-binbin 3352644
Don't set loading when loading slot RDB
enjoy-binbin b855ebd
Adding rdbLoadWithLoadingCtx function to take context arg
enjoy-binbin 74f0ebf
Use temp db to store the slot RDB data
enjoy-binbin ee13d8b
Restore the slot DB when doing slot failover
enjoy-binbin 3b2b5db
Restore the slot RDB when done loading it
enjoy-binbin 0027d8d
Handle delKeysInSlot in a command execution unit
enjoy-binbin e9cb015
Enable all slotsync tests
enjoy-binbin 112f8fa
Move the handler logic to replication
enjoy-binbin 3572157
Fix slotsync replica keep adding replication buffer
enjoy-binbin 3f6dd32
todo: there is a assert that need to fix
enjoy-binbin f95ed8d
Fix typo and format and build
enjoy-binbin 6f6725d
Initial commit merging with https://github.com/valkey-io/valkey/pull/…
murphyjacob4 fd7f0f6
Code cleanup and bug fixes
murphyjacob4 8c8f498
Fix bugs related to replication and incremental streaming
murphyjacob4 4b2af5b
Support two-phase commit and fix some bugs
murphyjacob4 dd8d210
Begin converting tests to TCL
murphyjacob4 5845522
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 6977fe5
Add more tests and recent migration logs
murphyjacob4 ecce391
Continue adding test cases and fixing edge cases
murphyjacob4 c93e2f9
Support FLUSHDB
murphyjacob4 b8f5881
Get test suite passing
murphyjacob4 33d9630
Refactor slot migration links
murphyjacob4 cb0616d
Add a few more test cases and address some bugs
murphyjacob4 e4309f2
Revert formatting changes to unchanged files
murphyjacob4 0de936c
Add a state machine diagram and format changes
murphyjacob4 9e9e54b
Cleanup test helpers
murphyjacob4 a329d79
Apply clang format
murphyjacob4 a6c0d94
Fix potential non-exporting data in snapshot
murphyjacob4 8f701e2
Remove patch in https://github.com/valkey-io/valkey/pull/1948
murphyjacob4 adcd2a7
Fix mac and 32bit build errors due to size_t formatting
murphyjacob4 4189c24
Improve flakiness of export client buffer enforcement on slow machines
murphyjacob4 fa638de
Remove unused custom listDup method
murphyjacob4 9b420da
Add configs and testing for CLUSTER MIGRATIONS
murphyjacob4 20725b8
Add test case for WRONGPASS
murphyjacob4 e58c391
Use consistent serverLog style
murphyjacob4 a2bfafb
Begin addressing first round of review feedback
murphyjacob4 b2fa7b4
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 daaf5c7
Propagate deletion using CLUSTER FLUSHSLOT
murphyjacob4 9c4aff9
Update commands JSON and comments
murphyjacob4 b08c029
Fix import-cancel arguments
murphyjacob4 76cf082
Address some of the review feedback
murphyjacob4 cb77227
Migrate to CLUSTER MIGRATE from CLUSTER IMPORT
murphyjacob4 2b3cfb3
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 f7edf02
Plumb slot throughout propagation code
murphyjacob4 23d51b5
Clang format fixes
murphyjacob4 15ae5be
Fix handling of SKIP_COMMAND_VALIDATION with export ongoing
murphyjacob4 626c212
Cleanup and test fixes
murphyjacob4 c8220a9
Add config for maximum buffer size for pause
murphyjacob4 d04b0d3
Fix typo
murphyjacob4 58bfca4
Fix test case causing flake
murphyjacob4 99ae259
Clang format
murphyjacob4 274aaa1
Address review feedback
murphyjacob4 9eb6db8
Additional hardening (eviction, KEYS, RANDOMKEY)
murphyjacob4 4620fa8
Fix crash in KEYS command when cluster disabled
murphyjacob4 98fc148
Add void parameter for MacOS build
murphyjacob4 b1d8a9a
Improve test stability for expiration and timeouts
murphyjacob4 e7a3679
Incremental test coverage and flake fixes
murphyjacob4 df9188b
Fix bug related to slot snapshot taking too long and add test
murphyjacob4 ef92f6d
Address more review feedback
murphyjacob4 6e82b71
Fix command help
murphyjacob4 a4e787a
Fix WAITAOF when there is no replicas
murphyjacob4 b2fdca5
Address even more review feedback
murphyjacob4 fe6a08e
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 a30fc53
Fix bug related to sending ACKs while connecting
murphyjacob4 42e2a2f
Include importing slots in RDB snapshots
murphyjacob4 0089ba3
Fix HASHTABLE_ITER_INCLUDE_IMPORTING flag definition
murphyjacob4 d9859c3
Fix bug where cancel during reading establish response could crash
murphyjacob4 e610448
Fix sanitizer issue with refactored predicate logic
murphyjacob4 3644335
Fix clang format
murphyjacob4 e88fe03
Remove predicate from kvstore, use per slot AOF rewrite
murphyjacob4 daa3254
Fix old references to CLUSTER IMPORT
murphyjacob4 1e22259
Fix address sanitizer issue during send child info
murphyjacob4 df9608c
Update tests to match CLUSTER MIGRATE
murphyjacob4 2eb3099
Rename slot migration link to slot migration job
murphyjacob4 3f535bd
Address review feedback from August 1-3
murphyjacob4 7ae4a05
Clang format
murphyjacob4 a9a8855
Rename CLUSTER CANCELMIGRATION to CANCELMIGRATIONS and other review f…
murphyjacob4 3a3e432
Use intptr_t for better portability
murphyjacob4 65985fe
Command renaming and other feedback
murphyjacob4 516a5a2
Rename SLOTMIGRATIONS to GETSLOTMIGRATIONS
murphyjacob4 ddb9b68
Fix commands.def
murphyjacob4 8f4bb42
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 6e4bab2
Atomic slot migration integration with hash field expiration
murphyjacob4 eef803f
Fix AOF rewrite behavior for hashes with expirations
murphyjacob4 df3b32a
Mark volatile field kvstore as importing for proper containment
murphyjacob4 9da6ad8
Address review feedback
murphyjacob4 1aa937d
Address another round of review feedback
murphyjacob4 f399e38
Fix CANCELMIGRATIONS help text
murphyjacob4 3210ef9
More review feedback
murphyjacob4 4607708
Review feedback
murphyjacob4 b400110
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 0d51e20
Command renaming for congruency
murphyjacob4 8eaad96
Merge remote-tracking branch 'upstream/unstable' into slot_migration_…
murphyjacob4 dae644d
Trigger tests
madolson 6e1b137
Fix some TLS related test failures
madolson 2a155f9
Remove slot migration from request response tool
madolson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.