Repository navigation
fix(pd): avoid duplicate drain migration submission - #3426
Merged
imbajin merged 13 commits intoOct 28, 2026
Merged
Conversation
- Separate live Stores from Up placement destinations using current metadata. - Keep Exiting leases alive until local engines and PD references are empty. - Serialize heartbeat, registration and state changes and preserve drain on restart. - Cover drain, stale leases, shared groups and concurrent updates in regressions.
Retry explicit Exiting requests after eligible capacity is restored. Dispatch management state notifications after releasing the Store lock. Preserve Tombstone as terminal across management state updates. Cover capacity recovery and concurrent placement with regressions.
Remove the two branch-specific patch and staging workflows.\nKeep regression tests and production changes in their normal modules.\nRetain validation evidence outside the source tree.
Merge the current master while retaining accepted migration groups. Use a set to avoid quadratic duplicate checks during drain. Register the management-entry regression in the normal core suite.
Attach the executable Boot jar with the exec classifier. Use that jar for distributions while preserving the launcher filename. Keep service classes available to later reactor dependencies.
3 of 11 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3426 +/- ##
============================================
+ Coverage 57.27% 57.87% +0.60%
+ Complexity 6577 2946 -3631
============================================
Files 776 777 +1
Lines 68881 69099 +218
Branches 9431 9484 +53
============================================
+ Hits 39449 39990 +541
+ Misses 25804 25443 -361
- Partials 3628 3666 +38
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bitflicker64
approved these changes
Oct 28, 2026
bitflicker64
left a comment
Contributor
There was a problem hiding this comment.
Blocking: no. Score: 9/10. Summary: Passing the groups accepted by movePartitions into storeTurnoff stops the second reallocShards change for the same shard group while rejected destinations keep the fallback, and the drain tests and all checks pass at a5b4934.
MrJs133
approved these changes
Oct 28, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Before → After
Removing an online Store could submit two independent migration commands for the same shard group: capacity-aware planning accepted one destination, then the Exiting-state transition planned the group again.
Carry accepted groups into the state transition so their chosen destinations remain authoritative. Keep the existing turnoff path as a fallback for groups not submitted after validation, and use a set for membership checks. Add regressions for both the fallback and the management-entry flow, registering the latter in the normal core suite. This suppresses duplicate planning within one management request; it does not provide durable task admission or deduplication across independent requests.
Keep PD service classes available to reactor dependencies by attaching the executable Boot jar with an exec classifier; distributions continue to use the established launcher filename.
Author-reported focused tests cover the drain submission paths; full validation and live migration/RC acceptance are not claimed.
Source PR: 🔗 org Server #347
Visual overview
Visual overview of the single-request drain plan: reuse accepted migration groups and fall back only for unsubmitted groups. This does not establish cross-request durable deduplication or cluster-level acceptance.