From b6255e320eadfdbff22bf18b31450a5274ef76f6 Mon Sep 17 00:00:00 2001 From: Xiangyu Yao Date: Thu, 22 Feb 2018 20:54:13 -0500 Subject: SERVER-33304 Rename RecoveryUnit::prepareSnapshot() to preallocateSnapshot() --- src/mongo/db/repl/oplog.cpp | 2 +- src/mongo/db/storage/recovery_unit.h | 2 +- src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp | 2 +- src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index d04c4823440..a098a5b7b38 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -155,7 +155,7 @@ void _getNextOpTimes(OperationContext* opCtx, } // Allow the storage engine to start the transaction outside the critical section. - opCtx->recoveryUnit()->prepareSnapshot(); + opCtx->recoveryUnit()->preallocateSnapshot(); stdx::lock_guard lk(newOpMutex); auto ts = LogicalClock::get(opCtx)->reserveTicks(count).asTimestamp(); diff --git a/src/mongo/db/storage/recovery_unit.h b/src/mongo/db/storage/recovery_unit.h index 48d1e83ece4..bbc56dadb73 100644 --- a/src/mongo/db/storage/recovery_unit.h +++ b/src/mongo/db/storage/recovery_unit.h @@ -90,7 +90,7 @@ public: * transaction resources while minimizing the critical section between generating a new * timestamp and setting it using setTimestamp. */ - virtual void prepareSnapshot() {} + virtual void preallocateSnapshot() {} /** * Informs this RecoveryUnit that all future reads through it should be from a snapshot diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp index cd520b9e5b6..2f37bad6783 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp @@ -179,7 +179,7 @@ void WiredTigerRecoveryUnit::abandonSnapshot() { _areWriteUnitOfWorksBanned = false; } -void WiredTigerRecoveryUnit::prepareSnapshot() { +void WiredTigerRecoveryUnit::preallocateSnapshot() { // Begin a new transaction, if one is not already started. getSession(); } diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h index feccabf38e4..e41047967e8 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h @@ -70,7 +70,7 @@ public: void registerChange(Change* change) override; void abandonSnapshot() override; - void prepareSnapshot() override; + void preallocateSnapshot() override; Status setReadFromMajorityCommittedSnapshot() override; bool isReadingFromMajorityCommittedSnapshot() const override { -- cgit v1.2.1