void DurRecoveryUnit::syncDataAndTruncateJournal() { #if ROLLBACK_ENABLED invariant(_state != MUST_ROLLBACK); publishChanges(); #endif return getDur().syncDataAndTruncateJournal(_txn); }
bool DurRecoveryUnit::commitIfNeeded(bool force) { #if ROLLBACK_ENABLED invariant(_state != MUST_ROLLBACK); publishChanges(); #endif _hasWrittenSinceCheckpoint = false; return getDur().commitIfNeeded(_txn, force); }
bool DurRecoveryUnit::awaitCommit() { #if ROLLBACK_ENABLED invariant(_state != MUST_ROLLBACK); publishChanges(); _state = NORMAL; #endif return getDur().awaitCommit(); }
void DurRecoveryUnit::commitUnitOfWork() { invariant(inAUnitOfWork()); invariant(!_mustRollback); if (!inOutermostUnitOfWork()) { // If we are nested, make all changes for this level part of the containing UnitOfWork. // They will be added to the global damages list once the outermost UnitOfWork commits, // which it must now do. if (haveUncommitedChangesAtCurrentLevel()) { _startOfUncommittedChangesForLevel.back() = _changes.size(); } return; } publishChanges(); // global journal flush opportunity getDur().commitIfNeeded(_txn); }
void DurRecoveryUnit::commitUnitOfWork() { #if ROLLBACK_ENABLED invariant(_state != MUST_ROLLBACK); invariant(_nestingLevel > 0); if (_nestingLevel != 1) { // If we are nested, punt to outer UnitOfWork. These changes will only be pushed to the // global damages list when the outer UnitOfWork commits (which it must now do). if (haveUncommitedChanges()) _state = MUST_COMMIT; return; } publishChanges(); #endif // global journal flush getDur().commitIfNeeded(_txn); }
void DurRecoveryUnit::syncDataAndTruncateJournal() { #if ROLLBACK_ENABLED publishChanges(); #endif return getDur().syncDataAndTruncateJournal(_txn); }