Storage Engine API
mongo::RecoveryUnit::Change Class Referenceabstract

A Change is an action that is registerChange()'d while a WriteUnitOfWork exists. More...

#include <recovery_unit.h>

Inheritance diagram for mongo::RecoveryUnit::Change:
mongo::BtreeLogic< BtreeLayout >::Builder::SetRightLeafLocChange< BtreeLayout > mongo::DatabaseImpl::AddCollectionChange mongo::DatabaseImpl::RemoveCollectionChange mongo::EphemeralForTestRecordStore::InsertChange mongo::EphemeralForTestRecordStore::RemoveChange mongo::EphemeralForTestRecordStore::TruncateChange mongo::IndexCatalogEntryImpl::SetHeadChange mongo::KVCatalog::AddIdentChange mongo::KVCatalog::RemoveIdentChange mongo::KVCollectionCatalogEntry::AddIndexChange mongo::KVCollectionCatalogEntry::RemoveIndexChange mongo::KVDatabaseCatalogEntryBase::AddCollectionChange mongo::KVDatabaseCatalogEntryBase::RemoveCollectionChange mongo::KVStorageEngine::RemoveDBChange mongo::MMAPV1DatabaseCatalogEntry::EntryInsertion mongo::MMAPV1DatabaseCatalogEntry::EntryRemoval mongo::MobileRecordStore::DataSizeChange mongo::MobileRecordStore::NumRecsChange mongo::MultiIndexBlockImpl::CleanupIndexesVectorOnRollback mongo::MultiIndexBlockImpl::SetNeedToCleanupOnRollback mongo::WiredTigerRecordStore::DataSizeChange mongo::WiredTigerRecordStore::NumRecordsChange mongo::WiredTigerRecordStore::OplogStones::InsertChange mongo::WiredTigerRecordStore::OplogStones::TruncateChange

Detailed Description

A Change is an action that is registerChange()'d while a WriteUnitOfWork exists.

The change is either rollback()'d or commit()'d when the WriteUnitOfWork goes out of scope.

Neither rollback() nor commit() may fail or throw exceptions.

Change implementors are responsible for handling their own locking, and must be aware that rollback() and commit() may be called after resources with a shorter lifetime than the WriteUnitOfWork have been freed. Each registered change will be committed or rolled back once.

commit() handlers are passed the timestamp at which the transaction is committed. If the transaction is not committed at a particular timestamp, or if the storage engine does not support timestamps, then boost::none will be supplied for this parameter.

Public Member Functions

virtual ~Change ()
 
virtual void rollback ()=0
 
virtual void commit (boost::optional< Timestamp > commitTime)=0
 

Constructor & Destructor Documentation

◆ ~Change()

virtual mongo::RecoveryUnit::Change::~Change ( )
inlinevirtual

Member Function Documentation

◆ commit()

◆ rollback()


The documentation for this class was generated from the following file: