diff options
author | William Schultz <william.schultz@mongodb.com> | 2018-04-04 17:08:04 -0400 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2018-04-04 17:14:47 -0400 |
commit | 66c537372c0aa54819adb7f72c9eda6cf8750f8e (patch) | |
tree | 18411741fc99e04f2c9d89d2c61e70f22c1bbd3f /src/mongo/db/command_generic_argument.cpp | |
parent | 69005c338fe103892d2941791b12f5c06aae3394 (diff) | |
download | mongo-66c537372c0aa54819adb7f72c9eda6cf8750f8e.tar.gz |
SERVER-34051 Require autocommit=false on all transaction operations and add support
for 'startTransaction' argument
This patch requires all operations that are part of a multi-statement transaction to
specify an autocommit=false command argument. It also adds the 'startTransaction'
command argument, which when specified as 'true' indicates that a command is
the beginning of a multi-statement transaction.
Diffstat (limited to 'src/mongo/db/command_generic_argument.cpp')
-rw-r--r-- | src/mongo/db/command_generic_argument.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/command_generic_argument.cpp b/src/mongo/db/command_generic_argument.cpp index ef9530d1cb0..ecd0213865b 100644 --- a/src/mongo/db/command_generic_argument.cpp +++ b/src/mongo/db/command_generic_argument.cpp @@ -50,7 +50,7 @@ struct SpecialArgRecord { // If that changes, it should be added. When you add to this list, consider whether you // should also change the filterCommandRequestForPassthrough() function. // clang-format off -static constexpr std::array<SpecialArgRecord, 23> specials{{ +static constexpr std::array<SpecialArgRecord, 24> specials{{ // /-isGeneric // | /-stripFromRequest // | | /-stripFromReply @@ -73,6 +73,7 @@ static constexpr std::array<SpecialArgRecord, 23> specials{{ {"lsid"_sd, 1, 0, 0}, {"txnNumber"_sd, 1, 0, 0}, {"autocommit"_sd, 1, 1, 0}, + {"startTransaction"_sd, 1, 1, 0}, {"stmtId"_sd, 1, 0, 0}, {"$gleStats"_sd, 0, 0, 1}, {"operationTime"_sd, 0, 0, 1}, |