-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Repl 2022-07-11, Repl 2022-08-08, Repl 2022-08-22, Repl 2022-09-05, Repl 2022-07-25
-
5
On step-up, we scan all sessions and reacquire locks for prepared transactions.
to acquire these locks we create new operation contexts using these transactions's sessions, so if these sessions got killed the opCtx got terminated which will raise an exception.
We are calling this procedure from a no-except function that will crash the server.
Call stack:
1- ReplicationCoordinatorImpl::signalDrainComplete (noexcept)
_externalState->onTransitionToPrimary(opCtx)
2- MongoDSessionCatalog::onStepUp(opCtx)
3- We create new opCtx to reacquire the locks to prepared txns with sessions that can be killed.