EmergencyReparentShard: include SQL thread position in most-advanced candidate selection #18531
Merged
timvaillancourt merged 6 commits intovitessio:mainfrom Sep 30, 2025
Merged
Conversation
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
EmergencyReparentShard: include SQL thread position in candidate selection EmergencyReparentShard: include SQL thread position in most-advanced candidate selection
timvaillancourt
commented
Aug 1, 2025
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18531 +/- ##
==========================================
+ Coverage 67.50% 67.52% +0.02%
==========================================
Files 1608 1608
Lines 263594 263624 +30
==========================================
+ Hits 177931 178004 +73
+ Misses 85663 85620 -43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b170d7e to
f730c19
Compare
Contributor
Author
|
This PR is ready for another round of reviews now 👍 We've done some internal testing and find this works as planned: which is allow ERS to skip the wait-for-applying-relaylogs phase on a minority of least-advanced tablets The idea is we know in advance they will never be the most-advanced post-relaylog-apply, so there's no need to wait on them |
…d candidate selection Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
72f425a to
ed44ffa
Compare
5 tasks
shlomi-noach
reviewed
Sep 2, 2025
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
arthurschreiber
approved these changes
Sep 25, 2025
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
shlomi-noach
approved these changes
Sep 30, 2025
5 tasks
tanjinx
pushed a commit
to slackhq/vitess
that referenced
this pull request
Nov 4, 2025
…d candidate selection (vitessio#18531) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
5 tasks
tanjinx
added a commit
to slackhq/vitess
that referenced
this pull request
Nov 5, 2025
…d candidate selection (vitessio#18531) (#736) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
tanjinx
added a commit
to slackhq/vitess
that referenced
this pull request
Nov 10, 2025
…d candidate selection (vitessio#18531) (#736) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
sbaker617
pushed a commit
to slackhq/vitess
that referenced
this pull request
Feb 5, 2026
…d candidate selection (vitessio#18531) (#736) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
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.
Description
This PR gives the tablet sorter in the
EmergencyReparentShardcontext of how advanced the SQL thread of replicas are. This is used to sort the best candidate when two tablets have the same relay log GTID setAs of this PR, this additional sort dimension won't have any benefit - because the ERS code currently waits for EVERY tablet to apply relay logs, but future PRs I have planned can build on this behaviour, for example the implementation of this RFC: #18529
Related Issue(s)
#18529
Checklist
Deployment Notes