/** * @param resetAlways when false, only resets committed transactions * @return true if was reset */ final boolean recoveryCleanup(boolean resetAlways) throws IOException { UndoLog undo = mUndoLog; if (undo != null) { switch (undo.peek(true)) { default: break; case UndoLog.OP_COMMIT: // Transaction was actually committed, but redo log is gone. This can happen // when a checkpoint completes in the middle of the transaction commit // operation. Method truncates undo log as a side-effect. undo.deleteGhosts(); resetAlways = true; break; case UndoLog.OP_COMMIT_TRUNCATE: // Like OP_COMMIT, but ghosts have already been deleted. undo.truncate(false); resetAlways = true; break; } } if (resetAlways) { reset(); } return resetAlways; }
UndoLog undo = mUndoLog; if (undo != null) { switch (undo.peek(true)) { default: break;
switch (undo.peek(true)) { default: break;