diff options
author | Randolph Tan <randolph@10gen.com> | 2018-06-29 10:19:48 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2018-08-08 16:00:20 -0400 |
commit | 52b2cc0886cdb992e2491067bdc029301d5bb6af (patch) | |
tree | c414da256a84890af3fb084ab699b572b49dab4f /src/mongo/db/db_raii.cpp | |
parent | 210bb5d91cb3c77bb3ed169114f8b85cd1062fb3 (diff) | |
download | mongo-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.cpp | 6 |
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; |