diff options
author | Samy Lanka <samy.lanka@mongodb.com> | 2019-07-11 10:44:27 -0400 |
---|---|---|
committer | Samy Lanka <samy.lanka@mongodb.com> | 2019-08-08 11:35:32 -0400 |
commit | 77967c90b1a521108c052af235ce7de9742aa95e (patch) | |
tree | 22809f1433ab3b2b3f85359400a36a7d7f8050c4 /src/mongo/db/initialize_operation_session_info.cpp | |
parent | 321201823455e1c648b7c6bd4ae0a59d1b7115b8 (diff) | |
download | mongo-77967c90b1a521108c052af235ce7de9742aa95e.tar.gz |
SERVER-40466 Unify checks for being in a multi-document transaction
Diffstat (limited to 'src/mongo/db/initialize_operation_session_info.cpp')
-rw-r--r-- | src/mongo/db/initialize_operation_session_info.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/initialize_operation_session_info.cpp b/src/mongo/db/initialize_operation_session_info.cpp index 0257878e145..2059dae0623 100644 --- a/src/mongo/db/initialize_operation_session_info.cpp +++ b/src/mongo/db/initialize_operation_session_info.cpp @@ -130,6 +130,7 @@ OperationSessionInfoFromClient initializeOperationSessionInfo(OperationContext* uassert(ErrorCodes::InvalidOptions, "Specifying autocommit=true is not allowed.", !osi.getAutocommit().value()); + opCtx->setInMultiDocumentTransaction(); } else { uassert(ErrorCodes::InvalidOptions, "'startTransaction' field requires 'autocommit' field to also be specified", |