diff options
author | William Schultz <william.schultz@mongodb.com> | 2019-04-08 13:56:25 -0400 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2019-04-08 13:56:25 -0400 |
commit | 73e719a1ee1c174a3131e19b537b3ae8aa958dad (patch) | |
tree | ed1ec4e4fa5db461c448f6b9283cb884cdb17fd1 | |
parent | ac77a440f9df976234c2fe92c6726348e592ca8d (diff) | |
download | mongo-73e719a1ee1c174a3131e19b537b3ae8aa958dad.tar.gz |
SERVER-39660 Move readSource re-definition to a clearer location in AutoGetCollectionForRead
-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); |