-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix PromoteReplica call in ERS #15934
Conversation
Signed-off-by: Manan Gupta <[email protected]>
… set replication source Signed-off-by: Manan Gupta <[email protected]>
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
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15934 +/- ##
==========================================
- Coverage 68.47% 68.46% -0.02%
==========================================
Files 1562 1562
Lines 197083 197080 -3
==========================================
- Hits 134962 134936 -26
- Misses 62121 62144 +23 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments that I think are important to resolve before this can be merged.
Also, can we create a test case for the context fix? We'd have to write the test without this PR's changes first and make sure it fails, and that it passes with this PR.
Signed-off-by: Manan Gupta <[email protected]>
@deepthi Added the test as well, which I ensured failed before the changes. |
Signed-off-by: Manan Gupta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this change? It was not apparent to me:
We now run PromoteReplica in parallel with SetReplicationSource
I wanted to understand and confirm that part (sorry if I just missed something obvious). Other than that, just minor comments.
Thank you for the review @mattlord. I'll work on addressing them 👍. As far as the changes for running |
Signed-off-by: Manan Gupta <[email protected]>
OK, I see. So here: https://github.com/vitessio/vitess/pull/15934/files#diff-aace4cbbbebad37f5072421e16ca464c0f0b4eb98ad287380c2c764d11e7b836R310-R311 We're calling the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only had minor comments/requests left so approving so that you can merge when you've addressed those as you feel is best.
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Thank you @mattlord! I've addressed all the review comments, and just waiting for the tests now! 🚀 |
Signed-off-by: Manan Gupta <[email protected]>
Description
As described in #15935, running PromoteReplica before calling
SetReplicationSource
on the replicas is an issue as it can causePromoteReplica
to indefinitely hang.This PR fixes 2 issues -
PromoteReplica
in parallel withSetReplicationSource
. This also allows us to not run thePrimaryPosition
RPC separately, sincePromoteReplica
also returns the position of the primary.PromoteReplica
andInitPrimary
both were being called without adding a context timeout. This has also been fixed now.Related Issue(s)
Checklist
Deployment Notes