onStepUpBegin initializes some promises that are expected to be fulfilled by onStepUpComplete. However, if the node is shut down between the call to onStepUpBegin and onStepUpComplete, these promises will be reset, leading to a crash if onStepUpComplete tries to dereference the boost::optional to fulfill them.
onStepUpComplete should ensure that the promises are set before fulfilling them and handle this gracefully. A similar problem was addressed during SERVER-115921.
Because this race can only occur during node shutdown, the resulting server crash is not as severe as might otherwise be expected.
- is related to
-
SERVER-115921 Fix range deleter service race condition with shared promise in step up and shutdowns
-
- Closed
-