diff options
-rw-r--r-- | src/mongo/db/db_raii.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index 7aa79365197..d4d876e4214 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -147,6 +147,7 @@ AutoGetCollectionForRead::AutoGetCollectionForRead(OperationContext* opCtx, if (readAtLastAppliedTimestamp) { opCtx->recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kLastApplied); + readSource = opCtx->recoveryUnit()->getTimestampReadSource(); } // This timestamp could be earlier than the timestamp seen when the transaction is opened @@ -160,7 +161,6 @@ AutoGetCollectionForRead::AutoGetCollectionForRead(OperationContext* opCtx, return; } - readSource = opCtx->recoveryUnit()->getTimestampReadSource(); invariant(lastAppliedTimestamp || readSource == RecoveryUnit::ReadSource::kMajorityCommitted); invariant(readConcernLevel != repl::ReadConcernLevel::kSnapshotReadConcern); |