summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2015-05-15 11:45:07 -0400
committerGeert Bosch <geert@mongodb.com>2015-05-15 19:57:16 -0400
commit44018783d2d0476ab7db9708ee98e14a2dd35f4e (patch)
tree2fe75bfba9865f784f8427f85d3a401972f03814 /src/mongo/db/query
parentb9a9539e6f39416fc9cc24bdcdc66092d801d52f (diff)
downloadmongo-44018783d2d0476ab7db9708ee98e14a2dd35f4e.tar.gz
SERVER-18171: Rename commitAndRestart to abandonSnapshot
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/find.cpp6
-rw-r--r--src/mongo/db/query/plan_executor.h2
-rw-r--r--src/mongo/db/query/plan_yield_policy.cpp2
-rw-r--r--src/mongo/db/query/plan_yield_policy.h2
-rw-r--r--src/mongo/db/query/query_yield.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp
index e81b18ea681..cc09944bfc6 100644
--- a/src/mongo/db/query/find.cpp
+++ b/src/mongo/db/query/find.cpp
@@ -77,7 +77,7 @@ namespace mongo {
_txn(txn),
_dismissed(false) {
// Save this for later. We restore it upon destruction.
- _txn->recoveryUnit()->commitAndRestart();
+ _txn->recoveryUnit()->abandonSnapshot();
_txnPreviousRecoveryUnit.reset(txn->releaseRecoveryUnit());
// Transfer ownership of the RecoveryUnit from the ClientCursor to the OpCtx.
@@ -90,7 +90,7 @@ namespace mongo {
}
ScopedRecoveryUnitSwapper::~ScopedRecoveryUnitSwapper() {
- _txn->recoveryUnit()->commitAndRestart();
+ _txn->recoveryUnit()->abandonSnapshot();
if (_dismissed) {
// Just clean up the recovery unit which we originally got from the ClientCursor.
@@ -706,7 +706,7 @@ namespace mongo {
else {
// We stash away the RecoveryUnit in the ClientCursor. It's used for subsequent
// getMore requests. The calling OpCtx gets a fresh RecoveryUnit.
- txn->recoveryUnit()->commitAndRestart();
+ txn->recoveryUnit()->abandonSnapshot();
cc->setOwnedRecoveryUnit(txn->releaseRecoveryUnit());
StorageEngine* storageEngine = getGlobalServiceContext()->getGlobalStorageEngine();
txn->setRecoveryUnit(storageEngine->newRecoveryUnit());
diff --git a/src/mongo/db/query/plan_executor.h b/src/mongo/db/query/plan_executor.h
index e8c74445787..98fd8991055 100644
--- a/src/mongo/db/query/plan_executor.h
+++ b/src/mongo/db/query/plan_executor.h
@@ -87,7 +87,7 @@ namespace mongo {
YIELD_AUTO,
// This will handle WriteConflictExceptions that occur while processing the query, but
- // will not yield locks. commitAndRestart() will be called if a WriteConflictException
+ // will not yield locks. abandonSnapshot() will be called if a WriteConflictException
// occurs so callers must be prepared to get a new snapshot.
WRITE_CONFLICT_RETRY_ONLY,
diff --git a/src/mongo/db/query/plan_yield_policy.cpp b/src/mongo/db/query/plan_yield_policy.cpp
index 3f7b8b68287..85cde44cf50 100644
--- a/src/mongo/db/query/plan_yield_policy.cpp
+++ b/src/mongo/db/query/plan_yield_policy.cpp
@@ -90,7 +90,7 @@ namespace mongo {
if (_policy == PlanExecutor::WRITE_CONFLICT_RETRY_ONLY) {
// Just reset the snapshot. Leave all LockManager locks alone.
- opCtx->recoveryUnit()->commitAndRestart();
+ opCtx->recoveryUnit()->abandonSnapshot();
}
else {
// Release and reacquire locks.
diff --git a/src/mongo/db/query/plan_yield_policy.h b/src/mongo/db/query/plan_yield_policy.h
index 8342a4adb21..8dc5d45447e 100644
--- a/src/mongo/db/query/plan_yield_policy.h
+++ b/src/mongo/db/query/plan_yield_policy.h
@@ -40,7 +40,7 @@ namespace mongo {
public:
/**
* If policy == WRITE_CONFLICT_RETRY_ONLY, shouldYield will only return true after
- * forceYield has been called, and yield will only commitAndRestart without releasing any
+ * forceYield has been called, and yield will only abandonSnapshot without releasing any
* locks.
*/
PlanYieldPolicy(PlanExecutor* exec, PlanExecutor::YieldPolicy policy);
diff --git a/src/mongo/db/query/query_yield.cpp b/src/mongo/db/query/query_yield.cpp
index 9fba99a9ac1..5d6994d7eb6 100644
--- a/src/mongo/db/query/query_yield.cpp
+++ b/src/mongo/db/query/query_yield.cpp
@@ -60,7 +60,7 @@ namespace mongo {
// Top-level locks are freed, release any potential low-level (storage engine-specific
// locks). If we are yielding, we are at a safe place to do so.
- txn->recoveryUnit()->commitAndRestart();
+ txn->recoveryUnit()->abandonSnapshot();
// Track the number of yields in CurOp.
txn->getCurOp()->yielded();