diff options
author | Geert Bosch <geert@mongodb.com> | 2015-05-15 11:45:07 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2015-05-15 19:57:16 -0400 |
commit | 44018783d2d0476ab7db9708ee98e14a2dd35f4e (patch) | |
tree | 2fe75bfba9865f784f8427f85d3a401972f03814 /src/mongo/db/commands/write_commands | |
parent | b9a9539e6f39416fc9cc24bdcdc66092d801d52f (diff) | |
download | mongo-44018783d2d0476ab7db9708ee98e14a2dd35f4e.tar.gz |
SERVER-18171: Rename commitAndRestart to abandonSnapshot
Diffstat (limited to 'src/mongo/db/commands/write_commands')
-rw-r--r-- | src/mongo/db/commands/write_commands/batch_executor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp index 3c2750dfb16..13305866af4 100644 --- a/src/mongo/db/commands/write_commands/batch_executor.cpp +++ b/src/mongo/db/commands/write_commands/batch_executor.cpp @@ -874,7 +874,7 @@ namespace mongo { state.unlock(); // This releases any storage engine held locks/snapshots. - _txn->recoveryUnit()->commitAndRestart(); + _txn->recoveryUnit()->abandonSnapshot(); } _txn->checkForInterrupt(); @@ -927,7 +927,7 @@ namespace mongo { finishCurrentOp( _txn, ¤tOp, result.getError() ); // End current transaction and release snapshot. - _txn->recoveryUnit()->commitAndRestart(); + _txn->recoveryUnit()->abandonSnapshot(); if ( result.getError() ) { result.getError()->setIndex( updateItem.getItemIndex() ); @@ -968,7 +968,7 @@ namespace mongo { finishCurrentOp( _txn, ¤tOp, result.getError() ); // End current transaction and release snapshot. - _txn->recoveryUnit()->commitAndRestart(); + _txn->recoveryUnit()->abandonSnapshot(); if ( result.getError() ) { result.getError()->setIndex( removeItem.getItemIndex() ); @@ -1103,7 +1103,7 @@ namespace mongo { catch ( const WriteConflictException& wce ) { state->unlock(); state->txn->getCurOp()->debug().writeConflicts++; - state->txn->recoveryUnit()->commitAndRestart(); + state->txn->recoveryUnit()->abandonSnapshot(); WriteConflictException::logAndBackoff( attempt++, "insert", state->getCollection() ? @@ -1129,7 +1129,7 @@ namespace mongo { // Errors release the write lock, as a matter of policy. if (result->getError()) { - state->txn->recoveryUnit()->commitAndRestart(); + state->txn->recoveryUnit()->abandonSnapshot(); state->unlock(); } } @@ -1366,7 +1366,7 @@ namespace mongo { createCollection = false; // RESTART LOOP fakeLoop = -1; - txn->recoveryUnit()->commitAndRestart(); + txn->recoveryUnit()->abandonSnapshot(); WriteConflictException::logAndBackoff( attempt++, "update", nsString.ns() ); } |