void RocksRecoveryUnit::_abort() { for (Changes::const_reverse_iterator it = _changes.rbegin(), end = _changes.rend(); it != end; ++it) { (*it)->rollback(); } _changes.clear(); _transaction.abort(); _deltaCounters.clear(); _writeBatch.reset(); _releaseSnapshot(); }
void RocksRecoveryUnit::commitUnitOfWork() { if (_depth > 1) { return; // only outermost gets committed. } if (_writeBatch) { _commit(); } for (Changes::const_iterator it = _changes.begin(), end = _changes.end(); it != end; ++it) { (*it)->commit(); } _changes.clear(); _releaseSnapshot(); }
void RocksRecoveryUnit::_abort() { try { for (Changes::const_reverse_iterator it = _changes.rbegin(), end = _changes.rend(); it != end; ++it) { (*it)->rollback(); } _changes.clear(); } catch (...) { std::terminate(); } _deltaCounters.clear(); _writeBatch.reset(); _releaseSnapshot(); }