summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/ephemeral_for_test
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/ephemeral_for_test')
-rw-r--r--src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp6
-rw-r--r--src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.h13
2 files changed, 8 insertions, 11 deletions
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp
index dd819c9ad48..8d1ac9735a7 100644
--- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp
+++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp
@@ -47,7 +47,7 @@ void EphemeralForTestRecoveryUnit::beginUnitOfWork(OperationContext* opCtx) {
_setState(State::kInactiveInUnitOfWork);
}
-void EphemeralForTestRecoveryUnit::commitUnitOfWork() {
+void EphemeralForTestRecoveryUnit::doCommitUnitOfWork() {
invariant(_inUnitOfWork(), toString(_getState()));
_setState(State::kCommitting);
@@ -70,7 +70,7 @@ void EphemeralForTestRecoveryUnit::commitUnitOfWork() {
_setState(State::kInactive);
}
-void EphemeralForTestRecoveryUnit::abortUnitOfWork() {
+void EphemeralForTestRecoveryUnit::doAbortUnitOfWork() {
invariant(_inUnitOfWork(), toString(_getState()));
_setState(State::kAborting);
@@ -100,7 +100,7 @@ bool EphemeralForTestRecoveryUnit::inActiveTxn() const {
return _inUnitOfWork();
}
-void EphemeralForTestRecoveryUnit::abandonSnapshot() {
+void EphemeralForTestRecoveryUnit::doAbandonSnapshot() {
invariant(!_inUnitOfWork(), toString(_getState()));
}
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.h b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.h
index 02e1727c44c..568a8fd19a5 100644
--- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.h
+++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.h
@@ -47,23 +47,15 @@ public:
virtual ~EphemeralForTestRecoveryUnit();
void beginUnitOfWork(OperationContext* opCtx) final;
- void commitUnitOfWork() final;
- void abortUnitOfWork() final;
virtual bool waitUntilDurable(OperationContext* opCtx);
bool inActiveTxn() const;
- virtual void abandonSnapshot();
-
Status obtainMajorityCommittedSnapshot() final;
virtual void registerChange(std::unique_ptr<Change> change);
- virtual SnapshotId getSnapshotId() const {
- return SnapshotId();
- }
-
virtual void setOrderedCommit(bool orderedCommit) {}
virtual void prepareUnitOfWork() override {}
@@ -89,6 +81,11 @@ public:
}
private:
+ void doCommitUnitOfWork() final;
+ void doAbortUnitOfWork() final;
+
+ void doAbandonSnapshot() final;
+
typedef std::vector<std::shared_ptr<Change>> Changes;
Changes _changes;