summaryrefslogtreecommitdiff
path: root/src/mongo/embedded/service_entry_point_embedded.cpp
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-03-26 16:10:05 -0400
committerLouis Williams <louis.williams@mongodb.com>2019-03-26 16:10:05 -0400
commit31a26cdd8900471c1bc9a934e8d4c16d06f611a3 (patch)
treeb6679fd95dc56e8ae155aef2d58245bc3dbfc24e /src/mongo/embedded/service_entry_point_embedded.cpp
parentaaa404d9d7e56a1d327f72e505f4e67b4a821959 (diff)
downloadmongo-31a26cdd8900471c1bc9a934e8d4c16d06f611a3.tar.gz
SERVER-40227 Pass ignore prepare behavior from a command attribute rather than using a whitelist
Diffstat (limited to 'src/mongo/embedded/service_entry_point_embedded.cpp')
-rw-r--r--src/mongo/embedded/service_entry_point_embedded.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/embedded/service_entry_point_embedded.cpp b/src/mongo/embedded/service_entry_point_embedded.cpp
index 6a7c17e5b64..8c19c925ea5 100644
--- a/src/mongo/embedded/service_entry_point_embedded.cpp
+++ b/src/mongo/embedded/service_entry_point_embedded.cpp
@@ -50,10 +50,13 @@ public:
void waitForReadConcern(OperationContext* opCtx,
const CommandInvocation* invocation,
const OpMsgRequest& request) const override {
+ const auto prepareConflictBehavior = invocation->canIgnorePrepareConflicts()
+ ? PrepareConflictBehavior::kIgnore
+ : PrepareConflictBehavior::kEnforce;
auto rcStatus = mongo::waitForReadConcern(opCtx,
repl::ReadConcernArgs::get(opCtx),
invocation->allowsAfterClusterTime(),
- request.getCommandName());
+ prepareConflictBehavior);
uassertStatusOK(rcStatus);
}