summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/snapshot_manager.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/storage/snapshot_manager.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/storage/snapshot_manager.h')
-rw-r--r--src/mongo/db/storage/snapshot_manager.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/storage/snapshot_manager.h b/src/mongo/db/storage/snapshot_manager.h
index d41df1c5013..7839ef179ba 100644
--- a/src/mongo/db/storage/snapshot_manager.h
+++ b/src/mongo/db/storage/snapshot_manager.h
@@ -59,14 +59,14 @@ public:
virtual void setCommittedSnapshot(const Timestamp& timestamp) = 0;
/**
- * Sets the snapshot for the last stable timestamp for reading on secondaries.
+ * Sets the lastApplied timestamp.
*/
- virtual void setLocalSnapshot(const Timestamp& timestamp) = 0;
+ virtual void setLastApplied(const Timestamp& timestamp) = 0;
/**
- * Returns the local snapshot timestamp.
+ * Returns the lastApplied timestamp.
*/
- virtual boost::optional<Timestamp> getLocalSnapshot() = 0;
+ virtual boost::optional<Timestamp> getLastApplied() = 0;
/**
* Drops all snapshots and clears the "committed" snapshot.