-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Labels:None
-
ALL
-
Sharding EMEA 2022-09-19
Handle the following improbable but risky race conditions in the range deleter service:
- The onStepDown hook may be invoked even if no step-up had previously happened in case of rollback (even when rollbacking happening on a SECONDARY node):
- Relax this invariant.
- Do not assume the executor exists as the onStepUpComplete hook may not have been previously invoked.
- As the recovery of range deleter tasks is only spawned on step-up but may complete later, it's not assumable that the node is still primary when the recovery finishes:
- Acquire the mutex and double check that the node is still primary before transitioning to "up" state