RestartReplication RPC#18628
Merged
timvaillancourt merged 2 commits intoOct 3, 2025
Merged
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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
|
5 tasks
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18628 +/- ##
==========================================
- Coverage 67.50% 67.47% -0.03%
==========================================
Files 1607 1607
Lines 263518 263600 +82
==========================================
- Hits 177885 177870 -15
- Misses 85633 85730 +97 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Comment on lines
+323
to
+339
| // Stop replication first | ||
| if err := tm.stopReplicationLocked(ctx); err != nil { | ||
| return err | ||
| } | ||
|
|
||
| semiSyncAction, err := tm.convertBoolToSemiSyncAction(ctx, semiSync) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| if err := tm.fixSemiSync(ctx, tm.Tablet().Type, semiSyncAction); err != nil { | ||
| return err | ||
| } | ||
|
|
||
| // Start replication | ||
| return tm.MysqlDaemon.StartReplication(ctx, tm.hookExtraEnv()) | ||
| } |
Member
There was a problem hiding this comment.
nit: should we also do similar function for startReplicationLocked?
harshit-gangal
approved these changes
Oct 1, 2025
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
Adding a
RestartReplicationrpc, that essentially works exactly likeStopReplication+StartReplication(including semi-sync setup), except it's done in one RPC and under one lock. this reduces number of RPC calls, and also reduces (but does not eliminate) the risk of something breaking in between.Related Issue(s)
Followup to #18626. We'd be happy to use
RestartReplicationin #18626 except of course we need two-versions hop before we can do so.Checklist
Deployment Notes