summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2018-02-22 20:54:13 -0500
committerXiangyu Yao <xiangyu.yao@mongodb.com>2018-02-23 14:38:03 -0500
commitb6255e320eadfdbff22bf18b31450a5274ef76f6 (patch)
tree7b2431baa247dd252fe17b61453fcddcb28dedff
parentbaef1f98322ce6a602a645c87691f19abf8257e8 (diff)
downloadmongo-b6255e320eadfdbff22bf18b31450a5274ef76f6.tar.gz
SERVER-33304 Rename RecoveryUnit::prepareSnapshot() to preallocateSnapshot()
-rw-r--r--src/mongo/db/repl/oplog.cpp2
-rw-r--r--src/mongo/db/storage/recovery_unit.h2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h2
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<stdx::mutex> 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 {