*
* We let the tracker know if it is the first pass or not, in order
* to support some internal tracker assertions.
*/
rollbackTracker.setFirstPass(firstUndoPass);
final Scanner rollbackScanner = rollbackTracker.getScanner();
try {
/*
* Iterate over the target LNs and commit records, constructing the
* tree.
*/
while (reader.readNextEntry()) {
counter.incNumRead();
if (reader.isLN()) {
/* Get the txnId from the log entry. */
Long txnId = reader.getTxnId();
/* Skip past this, no need to undo non-txnal LNs. */
if (txnId == null) {
continue;
}
if (rollbackScanner.positionAndCheck(reader.getLastLsn(),
txnId)) {
/*
* If an LN is in the rollback period and was part of a
* rollback, let the rollback scanner decide how it
* should be handled. This does not include LNs that
* were explicitly aborted.
*/
rollbackScanner.rollback(txnId, reader, tracker);
continue;
}
/* This LN is part of a committed txn. */
if (committedTxnIds.containsKey(txnId)) {