-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feature Request: Have an ERS cooldown period a la RecoveryPeriodBlockSeconds of classical orchestrator #19775
Copy link
Copy link
Open
Labels
Needs TriageThis issue needs to be correctly labelled and triagedThis issue needs to be correctly labelled and triaged
Description
Feature Description
Under some scenarios (e.g. client app overloading a shard's primary), vtorc can detect a DeadPrimary when the host is not really dead, just overloaded. This triggers an ERS, after which the newly elected primary is also overloaded, which leads to another DeadPrimary, which leads to another ERS... in other words, we have a cascading failure that can remove capacity from the shard.
Classical orchestrator had RecoveryPeriodBlockSeconds to avoid this. We propose having the same for vtorc/ERS, with suitable changes:
- Since
vtorcinstances do not have a shared state, they need to figure out whether an ERS has taken place less than the cooldown time ago externally. We propose leveraging the reparenting journal for that. - Given the above, we might as well put the logic outside of vtorc so it works not only for it but also for any externally triggered ERS.
EmergencyReparentShardRequestwould include an extra field that specifies anCoolDown.- The ERS code would:
- Fetch the last ERS reparenting journal entry of each tablet in the shard.
- Find the most recent one.
- Compare that with
now - CoolDownand decide whether the ERS can proceed or not.
Use Case(s)
Avoid cascading failure scenarios lie the one described above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs TriageThis issue needs to be correctly labelled and triagedThis issue needs to be correctly labelled and triaged