Skip to content

Conversation

@murphyjacob4
Copy link
Contributor

@murphyjacob4 murphyjacob4 commented Oct 20, 2025

Adds a new option --cluster-use-atomic-slot-migration. This will apply to both --cluster reshard and --cluster rebalance commands.

We could do some more optimizations here, but for now we batch all the slot ranges for one (source, target) pair and send them off as one CLUSTER MIGRATESLOTS request. We then wait for this request to finish through polling CLUSTER GETSLOTMIGRATIONS once every 100ms. We parse CLUSTER GETSLOTMIGRATIONS and look for the most recent migration affecting the requested slot range, then check if it is in progress, failed, cancelled, or successful. If there is a failure or cancellation, we give this error to the user.

Fixes #2504

Signed-off-by: Jacob Murphy <jkmurphy@google.com>
Signed-off-by: Jacob Murphy <jkmurphy@google.com>
@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 76.53846% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.61%. Comparing base (1cf0df9) to head (2287bef).

Files with missing lines Patch % Lines
src/valkey-cli.c 76.53% 61 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2755      +/-   ##
============================================
+ Coverage     72.60%   72.61%   +0.01%     
============================================
  Files           128      128              
  Lines         71303    71526     +223     
============================================
+ Hits          51767    51941     +174     
- Misses        19536    19585      +49     
Files with missing lines Coverage Δ
src/valkey-cli.c 57.06% <76.53%> (+0.84%) ⬆️

... and 10 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEW] Use atomic slot migration in valkey-cli

1 participant