32 #include <boost/optional.hpp> 33 #include <wiredtiger.h> 35 #include "mongo/base/disallow_copying.h" 36 #include "mongo/bson/timestamp.h" 39 #include "mongo/stdx/mutex.h" 43 class WiredTigerOplogManager;
void setCommittedSnapshot(const Timestamp ×tamp) final
Sets the snapshot to be used for committed reads.
Definition: wiredtiger_snapshot_manager.cpp:43
stdx::mutex _localSnapshotMutex
Definition: wiredtiger_snapshot_manager.h:91
boost::optional< Timestamp > getMinSnapshotForNextCommittedRead() const
Returns lowest SnapshotName that could possibly be used by a future call to beginTransactionOnCommitt...
Definition: wiredtiger_snapshot_manager.cpp:65
boost::optional< Timestamp > _localSnapshot
Definition: wiredtiger_snapshot_manager.h:92
IgnorePrepared
Definition: wiredtiger_begin_transaction_block.h:48
void dropAllSnapshots() final
Drops all snapshots and clears the "committed" snapshot.
Definition: wiredtiger_snapshot_manager.cpp:60
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
stdx::mutex _committedSnapshotMutex
Definition: wiredtiger_snapshot_manager.h:87
void setLocalSnapshot(const Timestamp ×tamp) final
Sets the snapshot for the last stable timestamp for reading on secondaries.
Definition: wiredtiger_snapshot_manager.cpp:50
MONGO_DISALLOW_COPYING(WiredTigerSnapshotManager)
Timestamp beginTransactionOnCommittedSnapshot(WT_SESSION *session) const
Starts a transaction and returns the SnapshotName used.
Definition: wiredtiger_snapshot_manager.cpp:70
boost::optional< Timestamp > getLocalSnapshot() final
Returns the local snapshot timestamp.
Definition: wiredtiger_snapshot_manager.cpp:55
Manages snapshots that can be read from at a later time.
Definition: snapshot_manager.h:47
boost::optional< Timestamp > _committedSnapshot
Definition: wiredtiger_snapshot_manager.h:88
WiredTigerSnapshotManager()=default
Definition: wiredtiger_snapshot_manager.h:45
Timestamp beginTransactionOnLocalSnapshot(WT_SESSION *session, WiredTigerBeginTxnBlock::IgnorePrepared ignorePrepared) const
Starts a transaction on the last stable local timestamp, set by setLocalSnapshot. ...
Definition: wiredtiger_snapshot_manager.cpp:86