/** * Recover transactions which were recorded by this master log, keyed by * transaction id. Recovered transactions have a NO_REDO durability mode. * All transactions are registered, and so they must be reset after * recovery is complete. Master log is truncated as a side effect of * calling this method. */ void recoverTransactions(LHashTable.Obj<LocalTransaction> txns, LockMode lockMode, long timeoutNanos) throws IOException { byte[] opRef = new byte[1]; byte[] entry; while ((entry = pop(opRef, true)) != null) { UndoLog log = recoverUndoLog(opRef[0], entry); LocalTransaction txn = log.recoverTransaction(lockMode, timeoutNanos); // Reload the UndoLog, since recoverTransaction consumes it all. txn.recoveredUndoLog(recoverUndoLog(opRef[0], entry)); txns.insert(log.mTxnId).value = txn; } }
byte[] entry; while ((entry = pop(opRef, true)) != null) { UndoLog log = recoverUndoLog(opRef[0], entry); txn.recoveredUndoLog(recoverUndoLog(opRef[0], entry)); txn.attach("recovery");
byte[] entry; while ((entry = pop(opRef, true)) != null) { UndoLog log = recoverUndoLog(opRef[0], entry); txn.recoveredUndoLog(recoverUndoLog(opRef[0], entry)); txn.attach("recovery");