}
}
/* Process IN types. */
if (fromLogType.isINType()) {
INLogEntry inEntry = (INLogEntry) targetLogEntry;
/* Keep track of the largest node ID seen. */
long nodeId = inEntry.getNodeId();
assert (nodeId != Node.NULL_NODE_ID);
maxNodeId = (nodeId > maxNodeId) ? nodeId : maxNodeId;
minReplicatedNodeId = (nodeId < minReplicatedNodeId) ?
nodeId : minReplicatedNodeId;
}
/* Process INContainingEntry types. */
if (fromLogType.isINType() ||
fromLogType.equals(LogEntryType.LOG_BIN_DELTA)) {
INContainingEntry inEntry =
(INContainingEntry) targetLogEntry;
/*
* Count the obsolete LSN of the previous version, if available and
* if not already counted. Use inexact counting for two reasons:
* 1) we don't always have the full LSN because earlier log
* versions only had the file number, and 2) we can't guarantee
* obsoleteness for provisional INs.
*/
long oldLsn = inEntry.getPrevFullLsn();
if (oldLsn != DbLsn.NULL_LSN) {
long newLsn = getLastLsn();
tracker.countObsoleteIfUncounted
(oldLsn, newLsn, fromLogType, 0, inEntry.getDbId(),
false /*countExact*/);
}
oldLsn = inEntry.getPrevDeltaLsn();
if (oldLsn != DbLsn.NULL_LSN) {
long newLsn = getLastLsn();
tracker.countObsoleteIfUncounted
(oldLsn, newLsn, fromLogType, 0, inEntry.getDbId(),
false /*countExact*/);
}
/*
* Count a provisional IN as obsolete if it follows
* partialCkptStart. It cannot have been already counted, because
* provisional INs are not normally counted as obsolete; they are
* only considered obsolete when they are part of a partial
* checkpoint.
*
* Depending on the exact point at which the checkpoint was
* aborted, this technique is not always accurate; therefore
* inexact counting must be used.
*/
if (isProvisional && partialCkptStart != DbLsn.NULL_LSN) {
oldLsn = getLastLsn();
if (DbLsn.compareTo(partialCkptStart, oldLsn) < 0) {
tracker.countObsoleteUnconditional
(oldLsn, fromLogType, 0, inEntry.getDbId(),
false /*countExact*/);
}
}
}