-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
There are currently several cancellation sources in the codebase that serve the exact same purpose: being instantiated on step-up and canceled on step-down. It looks like a recurring pattern that everyone implements in a custom way when needed.
Some examples:
- Primary only service
- Migration destination manager
- Collection sharding runtime (indirectly called after step-down)
- ...
Objective of this ticket is to include a cancellation source as part of the ReplicaSetAwareInterface so that it would replace most of the current usages and push to implement new features (or refactor old ones) on the top of this interface for behaviors modeled around step-up and step-down.
Possible implementation: the cancellation source may be unique and shared by all replica set aware instances or implemented as part of the replication coordinator, in the latter case it would be nice to have a way to easily access it from replica set aware instances.
- is related to
-
SERVER-68776 Cancel range deleter service's waits for ongoing queries in case of stepdown
- Closed