summaryrefslogtreecommitdiff
path: root/src/mongo/db/read_concern_mongod.cpp
diff options
context:
space:
mode:
authorJason Chan <jason.chan@10gen.com>2019-02-13 18:28:19 -0500
committerJason Chan <jason.chan@10gen.com>2019-02-13 18:28:19 -0500
commit0cdb86f3cf2bbabe448669598c32297f5ec8214f (patch)
tree2631b47d613b0271eea709503fad0a13833721bc /src/mongo/db/read_concern_mongod.cpp
parent970e0c02de8c5922efcab74cfee258f447f94741 (diff)
downloadmongo-0cdb86f3cf2bbabe448669598c32297f5ec8214f.tar.gz
SERVER-37948 Satisfy linearizable read concern on getMores
Diffstat (limited to 'src/mongo/db/read_concern_mongod.cpp')
-rw-r--r--src/mongo/db/read_concern_mongod.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/read_concern_mongod.cpp b/src/mongo/db/read_concern_mongod.cpp
index 968c06c2893..84584a01bc6 100644
--- a/src/mongo/db/read_concern_mongod.cpp
+++ b/src/mongo/db/read_concern_mongod.cpp
@@ -344,8 +344,8 @@ MONGO_REGISTER_SHIM(waitForReadConcern)
return Status::OK();
}
-MONGO_REGISTER_SHIM(waitForLinearizableReadConcern)(OperationContext* opCtx)->Status {
-
+MONGO_REGISTER_SHIM(waitForLinearizableReadConcern)
+(OperationContext* opCtx, const int readConcernTimeout)->Status {
CurOpFailpointHelpers::waitWhileFailPointEnabled(
&hangBeforeLinearizableReadConcern, opCtx, "hangBeforeLinearizableReadConcern", [opCtx]() {
log() << "batch update - hangBeforeLinearizableReadConcern fail point enabled. "
@@ -374,7 +374,7 @@ MONGO_REGISTER_SHIM(waitForLinearizableReadConcern)(OperationContext* opCtx)->St
});
}
WriteConcernOptions wc = WriteConcernOptions(
- WriteConcernOptions::kMajority, WriteConcernOptions::SyncMode::UNSET, 0);
+ WriteConcernOptions::kMajority, WriteConcernOptions::SyncMode::UNSET, readConcernTimeout);
repl::OpTime lastOpApplied = repl::ReplClientInfo::forClient(opCtx->getClient()).getLastOp();
auto awaitReplResult = replCoord->awaitReplication(opCtx, lastOpApplied, wc);