diff options
author | Suganthi Mani <suganthi.mani@mongodb.com> | 2019-08-26 15:03:15 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-08-26 15:03:15 +0000 |
commit | 4197e3c394abea7d01084e035a6ce8af32dc1161 (patch) | |
tree | ee85e3dd0724a1d4384b893d082a35d28c236ee7 /src/mongo/db/service_entry_point_mongod.cpp | |
parent | aaa9874e04dbc2a4a33aeb7bfad9bee60f7145e0 (diff) | |
download | mongo-4197e3c394abea7d01084e035a6ce8af32dc1161.tar.gz |
SERVER-39996 Moved setting ignorePrepared behavior outside of waitForReadConcern.
Diffstat (limited to 'src/mongo/db/service_entry_point_mongod.cpp')
-rw-r--r-- | src/mongo/db/service_entry_point_mongod.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index 5435e14b49a..5f769f4d2b2 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -64,17 +64,20 @@ public: return mongo::lockedForWriting(); } - void waitForReadConcern(OperationContext* opCtx, - const CommandInvocation* invocation, - const OpMsgRequest& request) const override { + void setPrepareConflictBehaviorForReadConcern( + OperationContext* opCtx, const CommandInvocation* invocation) const override { const auto prepareConflictBehavior = invocation->canIgnorePrepareConflicts() ? PrepareConflictBehavior::kIgnoreConflicts : PrepareConflictBehavior::kEnforce; + mongo::setPrepareConflictBehaviorForReadConcern( + opCtx, repl::ReadConcernArgs::get(opCtx), prepareConflictBehavior); + } - Status rcStatus = mongo::waitForReadConcern(opCtx, - repl::ReadConcernArgs::get(opCtx), - invocation->allowsAfterClusterTime(), - prepareConflictBehavior); + void waitForReadConcern(OperationContext* opCtx, + const CommandInvocation* invocation, + const OpMsgRequest& request) const override { + Status rcStatus = mongo::waitForReadConcern( + opCtx, repl::ReadConcernArgs::get(opCtx), invocation->allowsAfterClusterTime()); if (!rcStatus.isOK()) { if (ErrorCodes::isExceededTimeLimitError(rcStatus.code())) { |