summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2018-06-29 10:19:48 -0400
committerRandolph Tan <randolph@10gen.com>2018-08-08 16:00:20 -0400
commit52b2cc0886cdb992e2491067bdc029301d5bb6af (patch)
treec414da256a84890af3fb084ab699b572b49dab4f /src/mongo/db/db_raii.cpp
parent210bb5d91cb3c77bb3ed169114f8b85cd1062fb3 (diff)
downloadmongo-52b2cc0886cdb992e2491067bdc029301d5bb6af.tar.gz
SERVER-35900 Refactor transaction machinery out from Session class
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r--src/mongo/db/db_raii.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp
index 5b09a36981b..265c71aeb71 100644
--- a/src/mongo/db/db_raii.cpp
+++ b/src/mongo/db/db_raii.cpp
@@ -38,7 +38,7 @@
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/s/collection_sharding_state.h"
#include "mongo/db/server_parameters.h"
-#include "mongo/db/session_catalog.h"
+#include "mongo/db/transaction_participant.h"
#include "mongo/util/log.h"
namespace mongo {
@@ -323,8 +323,8 @@ LockMode getLockModeForQuery(OperationContext* opCtx) {
invariant(opCtx);
// Use IX locks for autocommit:false multi-statement transactions; otherwise, use IS locks.
- auto session = OperationContextSession::get(opCtx);
- if (session && session->inMultiDocumentTransaction()) {
+ auto txnParticipant = TransactionParticipant::get(opCtx);
+ if (txnParticipant && txnParticipant->inMultiDocumentTransaction()) {
return MODE_IX;
}
return MODE_IS;