Since the range deleter service lifetime is associated with step-up/down (SERVER-67636), non-pending range deletions must be recovered on step-up. The re-registration on the service should happen asynchronously, so that step-up will not be blocked by the initialization of the range deleter.
A possible way to do so will be the following:
- Acquire the global scoped range deleter lock
- Spawn a new thread, passing it the scoped lock:
This way, the step-up will not be blocked by the recovery of range deletions and - at the same time - it will not be possible to miss documents because no thread will be allowed to write on the config.rangeDeletions collection as long as the lock will be in scope.
The recovery performed on the legacy range deleter can partially serve as an example for the work to be done under this ticket. Also, remember to feature flag the legacy recovery as part of this ticket.
- causes
-
SERVER-72818 Wait for range deleter service to be fully initialized before transitioning to primary
- Closed
- depends on
-
SERVER-67636 Associate range deleter service lifetime to step-up/step-down
- Closed
- is depended on by
-
SERVER-65558 Enable Feature flag for PM-2849
- Closed