summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2018-10-26 10:56:27 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2018-11-12 09:16:36 -0500
commit0c6924a93c1d4ac81df8d710544901444d631127 (patch)
treec01c2146d504258f4e021ebcb09d9553b69f5834 /src/mongo/db/db_raii.cpp
parent7ad4f64b8c88f0249ef6e8f573b71d0509ab699f (diff)
downloadmongo-0c6924a93c1d4ac81df8d710544901444d631127.tar.gz
SERVER-37676 Remove unsafe inMultiDocumentTransaction()
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r--src/mongo/db/db_raii.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp
index aac8b3a218b..bfeaee724b2 100644
--- a/src/mongo/db/db_raii.cpp
+++ b/src/mongo/db/db_raii.cpp
@@ -369,7 +369,7 @@ LockMode getLockModeForQuery(OperationContext* opCtx) {
// Use IX locks for autocommit:false multi-statement transactions; otherwise, use IS locks.
auto session = OperationContextSession::get(opCtx);
- if (session && session->inMultiDocumentTransaction()) {
+ if (session && session->inActiveOrKilledMultiDocumentTransaction()) {
return MODE_IX;
}
return MODE_IS;