summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.h
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2020-05-12 13:39:31 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-12 18:03:48 +0000
commit25c694f365db0f07a445bd17b6cd5cbf32f5f2f9 (patch)
treec90451e347838f428b8cad851531b42c42cce6fa /src/mongo/db/db_raii.h
parente2602ad053b2120982fbcac8e33e1ad64e6ec30a (diff)
downloadmongo-25c694f365db0f07a445bd17b6cd5cbf32f5f2f9.tar.gz
SERVER-46721 Secondary readers should read at the no-overlap time instead of lastApplied
The no-overlap time, ReadSource::kNoOverlap, is the minimum of replication's lastApplied timestamp and WiredTiger's all_durable time. This time is independent of replication state and ensures queries do not see oplog holes after state transitions from secondary to primary.
Diffstat (limited to 'src/mongo/db/db_raii.h')
-rw-r--r--src/mongo/db/db_raii.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/mongo/db/db_raii.h b/src/mongo/db/db_raii.h
index edf32cd0010..51208643c6a 100644
--- a/src/mongo/db/db_raii.h
+++ b/src/mongo/db/db_raii.h
@@ -133,19 +133,6 @@ private:
// This field is optional, because the code to wait for majority committed snapshot needs to
// release locks in order to block waiting
boost::optional<AutoGetCollection> _autoColl;
-
- // Returns true if we should read at the last applied timestamp instead of at "no" timestamp
- // (i.e. reading with the "latest" snapshot reflecting all writes). Reading at the last applied
- // timestamp avoids reading in-flux data actively being written by the replication system.
- bool _shouldReadAtLastAppliedTimestamp(OperationContext* opCtx,
- const NamespaceString& nss,
- repl::ReadConcernLevel readConcernLevel) const;
-
- // Returns true if the minSnapshot causes conflicting catalog changes for either the provided
- // lastAppliedTimestamp or the point-in-time snapshot of the RecoveryUnit on 'opCtx'.
- bool _conflictingCatalogChanges(OperationContext* opCtx,
- boost::optional<Timestamp> minSnapshot,
- boost::optional<Timestamp> lastAppliedTimestamp) const;
};
/**