summaryrefslogtreecommitdiff
path: root/src/mongo/db/read_concern.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2018-09-14 10:13:35 -0400
committerMatthew Russotto <matthew.russotto@10gen.com>2018-09-14 10:17:42 -0400
commitc46faf4672c81d4801014981669d770fc65b950e (patch)
tree779e165fa75ed59b9c06b474f6ca5f7b6ac97f09 /src/mongo/db/read_concern.cpp
parentf92a1d2aaf0f4d2874f64a5e1b3c12fc66e39d4d (diff)
downloadmongo-c46faf4672c81d4801014981669d770fc65b950e.tar.gz
SERVER-35821 readConcern:snapshot transactions need a read timestamp <= WT's all_committed point
Diffstat (limited to 'src/mongo/db/read_concern.cpp')
-rw-r--r--src/mongo/db/read_concern.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/read_concern.cpp b/src/mongo/db/read_concern.cpp
index 53372e23878..6184548f7b0 100644
--- a/src/mongo/db/read_concern.cpp
+++ b/src/mongo/db/read_concern.cpp
@@ -295,7 +295,11 @@ Status waitForReadConcern(OperationContext* opCtx,
"node needs to be a replica set member to use readConcern: snapshot"};
}
if (speculative) {
- txnParticipant->setSpeculativeTransactionOpTimeToLastApplied(opCtx);
+ txnParticipant->setSpeculativeTransactionOpTime(
+ opCtx,
+ readConcernArgs.getOriginalLevel() == repl::ReadConcernLevel::kSnapshotReadConcern
+ ? SpeculativeTransactionOpTime::kAllCommitted
+ : SpeculativeTransactionOpTime::kLastApplied);
}
}