summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2020-09-10 12:30:21 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-10 18:15:18 +0000
commit11c68393df88a6f1ea4855e6ac15e54ca9f9d976 (patch)
tree893c5bb98404d3dabfa35f017e466345b0a44d80 /src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp
parentce0487190cf69d200028e7f9f4bcd3cefeea805d (diff)
downloadmongo-11c68393df88a6f1ea4855e6ac15e54ca9f9d976.tar.gz
SERVER-48452 Internal readers should default to reading without a timestamp
Removes ReadSource::kUnset in favor of kNoTimestamp as the default Makes the following behavioral changes to AutoGetCollectionForRead: * Removes special early-return handling for kNoTimestamp * Only user or DBDirectClient operations are eligible to read at kLastApplied. * Operations only read at kLastApplied when in the SECONDARY state, nothing else. This means most internal operations that use DBDirectClient do not need to use a ReadSourceScope to ensure they read at kNoTimestamp.
Diffstat (limited to 'src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp')
-rw-r--r--src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp
index fcf49f74442..e249daed751 100644
--- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp
+++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine_test.cpp
@@ -359,7 +359,7 @@ TEST_F(EphemeralForTestKVEngineTest, ReadOlderSnapshotsSimple) {
ASSERT(!rs->findRecord(&opCtx, loc2, &rd));
opCtx.recoveryUnit()->abandonSnapshot();
- opCtx.recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kUnset);
+ opCtx.recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kNoTimestamp);
ASSERT(rs->findRecord(&opCtx, loc1, &rd));
ASSERT(rs->findRecord(&opCtx, loc2, &rd));
}
@@ -452,7 +452,7 @@ TEST_F(EphemeralForTestKVEngineTest, SetReadTimestampBehindOldestTimestamp) {
ASSERT_THROWS_CODE(rs->findRecord(&opCtx, loc2, &rd), DBException, ErrorCodes::SnapshotTooOld);
opCtx.recoveryUnit()->abandonSnapshot();
- opCtx.recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kUnset);
+ opCtx.recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kNoTimestamp);
ASSERT(rs->findRecord(&opCtx, loc1, &rd));
ASSERT(rs->findRecord(&opCtx, loc2, &rd));
}