35 #include "mongo/db/record_id.h" 37 #include "mongo/stdx/functional.h" 41 class SortedDataInterface;
virtual void * writingPtr(void *data, size_t len)
Declare that the data at [x, x + len) is being written.
Definition: ephemeral_for_test_recovery_unit.h:67
virtual void setOrderedCommit(bool orderedCommit)
Definition: ephemeral_for_test_recovery_unit.h:77
Changes _changes
Definition: ephemeral_for_test_recovery_unit.h:85
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
Definition: database_impl.cpp:956
virtual void setRollbackWritesDisabled()
Sets a flag that declares this RecoveryUnit will skip rolling back writes, for the duration of the cu...
Definition: ephemeral_for_test_recovery_unit.h:71
std::shared_ptr< void > data
Definition: ephemeral_for_test_record_store_test.cpp:74
void commitUnitOfWork() final
Marks the end of a unit of work and commits all changes registered by calls to onCommit or registerCh...
Definition: ephemeral_for_test_recovery_unit.cpp:40
virtual void abandonSnapshot()
If there is an open transaction, it is closed.
Definition: ephemeral_for_test_recovery_unit.h:59
A RecoveryUnit is responsible for ensuring that data is persisted.
Definition: recovery_unit.h:51
std::shared_ptr< Change > ChangePtr
Definition: ephemeral_for_test_recovery_unit.h:82
void abortUnitOfWork() final
Marks the end of a unit of work and rolls back all changes registered by calls to onRollback or regis...
Definition: ephemeral_for_test_recovery_unit.cpp:56
virtual SnapshotId getSnapshotId() const
Gets the local SnapshotId.
Definition: ephemeral_for_test_recovery_unit.h:73
stdx::function< void()> _waitUntilDurableCallback
Definition: ephemeral_for_test_recovery_unit.h:86
A Change is an action that is registerChange()'d while a WriteUnitOfWork exists.
Definition: recovery_unit.h:281
std::vector< ChangePtr > Changes
Definition: ephemeral_for_test_recovery_unit.h:83
virtual void setPrepareTimestamp(Timestamp)
Sets a prepare timestamp for the current transaction.
Definition: ephemeral_for_test_recovery_unit.h:79
Definition: snapshot.h:37
EphemeralForTestRecoveryUnit(stdx::function< void()> cb=nullptr)
Definition: ephemeral_for_test_recovery_unit.h:45
void beginUnitOfWork(OperationContext *opCtx) final
Marks the beginning of a unit of work.
Definition: ephemeral_for_test_recovery_unit.h:48
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
Status obtainMajorityCommittedSnapshot() final
Obtains a majority committed snapshot.
Definition: ephemeral_for_test_recovery_unit.cpp:70
Definition: ephemeral_for_test_recovery_unit.h:43
virtual void registerChange(Change *change)
The RecoveryUnit takes ownership of the change.
Definition: ephemeral_for_test_recovery_unit.h:63
virtual bool waitUntilDurable()
Waits until all commits that happened before this call are durable in the journal.
Definition: ephemeral_for_test_recovery_unit.h:52