diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-03-14 12:34:23 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-03-19 17:03:40 -0400 |
commit | 197233a97c2a8859b82ba1ffeac97ba2719f6470 (patch) | |
tree | 56d7bfb37a6957c27bc7ee13c062086742a59fa9 /src/mongo/db/service_entry_point_mongod.cpp | |
parent | 81d045a17ddf08e9f0eb7f30f96b45a352fab5cc (diff) | |
download | mongo-197233a97c2a8859b82ba1ffeac97ba2719f6470.tar.gz |
SERVER-39074 All operations enforce prepare conflicts by default
Prepare conflicts may only be safely ignored when a command can
guarantee it does not perform writes. Prepare conflicts are ignored when
the read concern is local, available, or majority and the command is
aggregate, count, distinct, find, getMore, or group. Aggregate is a
special case because it may perform writes to an output collection, but
it enables prepare conflict enforcement before doing so.
Additionally, connections from a DBDirectClient inherit the
ignore_prepare state from their parent operation.
Diffstat (limited to 'src/mongo/db/service_entry_point_mongod.cpp')
-rw-r--r-- | src/mongo/db/service_entry_point_mongod.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index 0e870bf80a6..3d7a8097beb 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -67,8 +67,10 @@ public: void waitForReadConcern(OperationContext* opCtx, const CommandInvocation* invocation, const OpMsgRequest& request) const override { - Status rcStatus = mongo::waitForReadConcern( - opCtx, repl::ReadConcernArgs::get(opCtx), invocation->allowsAfterClusterTime()); + Status rcStatus = mongo::waitForReadConcern(opCtx, + repl::ReadConcernArgs::get(opCtx), + invocation->allowsAfterClusterTime(), + request.getCommandName()); if (!rcStatus.isOK()) { if (ErrorCodes::isExceededTimeLimitError(rcStatus.code())) { |