The changes from 1447252 as part of SERVER-35173 made it so we acquire the Client::_lock before calling SessionCatalog::checkOutSession(). However, if
pred = [&sri]() { return !sri->checkedOut; }
isn't immediately satisfied, then we'll attempt to acquire the Client::_lock a second time while already holding it.
auto& checkedOutSession = operationSessionDecoration(opCtx); if (!checkedOutSession) { auto sessionTransactionTable = SessionCatalog::get(opCtx); // We acquire a Client lock here to guard the construction of this session so that // references to this session are safe to use while the lock is held. stdx::lock_guard<Client> lk(*opCtx->getClient()); checkedOutSession.emplace(sessionTransactionTable->checkOutSession(opCtx));
// Wait until the session is no longer checked out opCtx->waitForConditionOrInterrupt( sri->availableCondVar, ul, [&sri]() { return !sri->checkedOut; });
Note: The changes from SERVER-35173 exist only on the master branch and this issue therefore does not affect 4.0 or earlier branches.
- has to be done before
-
SERVER-36306 Add FSM workloads that run transactions workloads with all threads attempting to use the same Session
- Closed
- is caused by
-
SERVER-35173 Add autocommit value to transaction sub-document of currentOp
- Closed
- related to
-
SERVER-36736 Avoid doing work in Client lock when destroying OperationContextSession
- Closed