-
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
Feature Request: allow current/before PRIMARY
to be specified in ERS
#16430
Comments
Your understanding of PRS is already idempotent as long as you provide the |
VTOrc only runs |
There are multiple ways of solving this without adding another flag to PRS
|
PRIMARY
to be specified in PRSPRIMARY
to be specified in ERS
@GuptaManan100 / @deepthi it looks like I made a mistake in relaying the problem internally. What we're looking for is adding the "expected" primary to To rephrase the scenario again, we would like the ability to specify the This will allow external automation to be sure an ERS will happen only if the requestor's view of the world is still correct. If the I've implemented this approach in this PR to illustrate: #16852. Your thoughts are appreciated! 🙇 |
Feature Description
This issue proposes that the current/before shard
PRIMARY
can be specified inPlannedReparentShard
EmergencyReparentShard
RPC requests in order to support a more idempotent(?) operation, where if the provided, "current"PRIMARY
is no longer correct, the operation fails or no-opsThis could be implemented by adding an optional request-field
ExpectedPrimary *topodatapb.TabletAlias
containing the alias of who you think thePRIMARY
is "now". In theEmergencyReparentShard
.reparentShardLocked(...)
logic the current primary can be compared to this alias and a mismatch is handledYour feedback is much appreciated!
Use Case(s)
This support can prevent situations when an issue is fixed by VTOrc while external automation is also issuing
EmergencyReparentShard
operationsIt would be great if the external automation could say "PRS only if alias X is still the
PRIMARY
" and if something changed the world in the process, this operation does no go throughThe text was updated successfully, but these errors were encountered: