void WiredTigerRecoveryUnit::_abort() { try { bool notifyDone = !_prepareTimestamp.isNull(); if (_session && _isActive()) { _txnClose(false); } _setState(State::kAborting); if (MONGO_FAIL_POINT(WTAlwaysNotifyPrepareConflictWaiters)) { notifyDone = true; } if (notifyDone) { _sessionCache->notifyPreparedUnitOfWorkHasCommittedOrAborted(); } for (Changes::const_reverse_iterator it = _changes.rbegin(), end = _changes.rend(); it != end; ++it) { Change* change = it->get(); LOG(2) << "CUSTOM ROLLBACK " << redact(demangleName(typeid(*change))); change->rollback(); } _changes.clear(); } catch (...) { std::terminate(); } _setState(State::kInactive); }
void TerarkDbRecoveryUnit::_abort() { try { if (_active) { _txnClose(false); } for (Changes::const_reverse_iterator it = _changes.rbegin(), end = _changes.rend(); it != end; ++it) { Change* change = *it; LOG(2) << "CUSTOM ROLLBACK " << demangleName(typeid(*change)); change->rollback(); } _changes.clear(); invariant(!_active); } catch (...) { std::terminate(); } }