#include <wiredtiger_snapshot_manager.h>
|
virtual | ~SnapshotManager ()=default |
| SnapshotManagers are not intended to be deleted through pointers to base type. More...
|
|
◆ WiredTigerSnapshotManager()
mongo::WiredTigerSnapshotManager::WiredTigerSnapshotManager |
( |
| ) |
|
|
default |
◆ beginTransactionOnCommittedSnapshot()
Timestamp mongo::WiredTigerSnapshotManager::beginTransactionOnCommittedSnapshot |
( |
WT_SESSION * |
session | ) |
const |
Starts a transaction and returns the SnapshotName used.
Throws if there is currently no committed snapshot.
◆ beginTransactionOnLocalSnapshot()
Starts a transaction on the last stable local timestamp, set by setLocalSnapshot.
Throws if no local snapshot has been set.
◆ dropAllSnapshots()
void mongo::WiredTigerSnapshotManager::dropAllSnapshots |
( |
| ) |
|
|
finalvirtual |
◆ getLocalSnapshot()
boost::optional< Timestamp > mongo::WiredTigerSnapshotManager::getLocalSnapshot |
( |
| ) |
|
|
finalvirtual |
◆ getMinSnapshotForNextCommittedRead()
boost::optional< Timestamp > mongo::WiredTigerSnapshotManager::getMinSnapshotForNextCommittedRead |
( |
| ) |
const |
Returns lowest SnapshotName that could possibly be used by a future call to beginTransactionOnCommittedSnapshot, or boost::none if there is currently no committed snapshot.
This should not be used for starting a transaction on this SnapshotName since the named snapshot may be deleted by the time you start the transaction.
◆ MONGO_DISALLOW_COPYING()
◆ setCommittedSnapshot()
void mongo::WiredTigerSnapshotManager::setCommittedSnapshot |
( |
const Timestamp & |
timestamp | ) |
|
|
finalvirtual |
Sets the snapshot to be used for committed reads.
Implementations are allowed to assume that all older snapshots have names that compare less than the passed in name, and newer ones compare greater.
This is called while holding a very hot mutex. Therefore it should avoid doing any work that can be done later.
Implements mongo::SnapshotManager.
◆ setLocalSnapshot()
void mongo::WiredTigerSnapshotManager::setLocalSnapshot |
( |
const Timestamp & |
timestamp | ) |
|
|
finalvirtual |
Sets the snapshot for the last stable timestamp for reading on secondaries.
Implements mongo::SnapshotManager.
◆ _committedSnapshot
boost::optional<Timestamp> mongo::WiredTigerSnapshotManager::_committedSnapshot |
|
private |
◆ _committedSnapshotMutex
stdx::mutex mongo::WiredTigerSnapshotManager::_committedSnapshotMutex |
|
mutableprivate |
◆ _localSnapshot
boost::optional<Timestamp> mongo::WiredTigerSnapshotManager::_localSnapshot |
|
private |
◆ _localSnapshotMutex
stdx::mutex mongo::WiredTigerSnapshotManager::_localSnapshotMutex |
|
mutableprivate |
The documentation for this class was generated from the following files: