-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Description
Overview of the Issue
I noticed two small-ish issues with EmergencyReparentShard:
- When the
DemotePrimarycall fails (e.g. because the old primary is not reachable due to a network outage), we still attempt to callSetReplicationSourceon it, which will "forcefully" switch it to be aREPLICA. I don't think this necessarily makes sense - if we couldn't demote the primary I think it's better to just leave it running and have it demote itself once it notices that a different primary has been elected. So depending on whether the old primary is available again at that point, there's two different flows how it will be switched to be a REPLICA. - The call to
SetReplicationSourcecan keep executing even afterEmergencyReparentShardhas been cancelled. I don't think that's intentional and can lead to very hard to understand behavior.
Reproduction Steps
N/A
Binary Version
N/AOperating System and Environment details
N/A