summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp')
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp b/src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp
index 7ccf4574d47..80999a59305 100644
--- a/src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_recovery_unit.cpp
@@ -37,30 +37,28 @@
namespace mongo {
- void InMemoryRecoveryUnit::commitUnitOfWork() {
- try {
- for (Changes::iterator it = _changes.begin(), end = _changes.end(); it != end; ++it) {
- (*it)->commit();
- }
- _changes.clear();
- }
- catch (...) {
- std::terminate();
+void InMemoryRecoveryUnit::commitUnitOfWork() {
+ try {
+ for (Changes::iterator it = _changes.begin(), end = _changes.end(); it != end; ++it) {
+ (*it)->commit();
}
+ _changes.clear();
+ } catch (...) {
+ std::terminate();
}
+}
- void InMemoryRecoveryUnit::abortUnitOfWork() {
- try {
- for (Changes::reverse_iterator it = _changes.rbegin(), end = _changes.rend();
- it != end; ++it) {
- ChangePtr change = *it;
- LOG(2) << "CUSTOM ROLLBACK " << demangleName(typeid(*change));
- change->rollback();
- }
- _changes.clear();
- }
- catch (...) {
- std::terminate();
+void InMemoryRecoveryUnit::abortUnitOfWork() {
+ try {
+ for (Changes::reverse_iterator it = _changes.rbegin(), end = _changes.rend(); it != end;
+ ++it) {
+ ChangePtr change = *it;
+ LOG(2) << "CUSTOM ROLLBACK " << demangleName(typeid(*change));
+ change->rollback();
}
+ _changes.clear();
+ } catch (...) {
+ std::terminate();
}
}
+}