* in the in-memory tree.
*/
private void readINsAndTrackIds(long rollForwardLsn)
throws IOException, DatabaseException {
INFileReader reader =
new INFileReader(env,
readBufferSize,
rollForwardLsn, // start lsn
info.nextAvailableLsn, // end lsn
true, // track node and db ids
false, // map db only
info.partialCheckpointStartLsn,
fileSummaryLsns);
reader.addTargetType(LogEntryType.LOG_IN);
reader.addTargetType(LogEntryType.LOG_BIN);
reader.addTargetType(LogEntryType.LOG_IN_DELETE_INFO);
try {
info.numMapINs = 0;
DbTree dbMapTree = env.getDbMapTree();
/*
* Process every IN, INDeleteInfo, and INDupDeleteInfo in the
* mapping tree.
*/
while (reader.readNextEntry()) {
DatabaseId dbId = reader.getDatabaseId();
if (dbId.equals(DbTree.ID_DB_ID)) {
DatabaseImpl db = dbMapTree.getDb(dbId);
replayOneIN(reader, db, false);
info.numMapINs++;
}
}
/*
* Update node id and database sequences. Use either the maximum of
* the ids seen by the reader vs the ids stored in the checkpoint.
*/
info.useMaxNodeId = reader.getMaxNodeId();
info.useMaxDbId = reader.getMaxDbId();
info.useMaxTxnId = reader.getMaxTxnId();
if (info.checkpointEnd != null) {
if (info.useMaxNodeId < info.checkpointEnd.getLastNodeId()) {
info.useMaxNodeId = info.checkpointEnd.getLastNodeId();
}
if (info.useMaxDbId < info.checkpointEnd.getLastDbId()) {
info.useMaxDbId = info.checkpointEnd.getLastDbId();
}
if (info.useMaxTxnId < info.checkpointEnd.getLastTxnId()) {
info.useMaxTxnId = info.checkpointEnd.getLastTxnId();
}
}
Node.setLastNodeId(info.useMaxNodeId);
env.getDbMapTree().setLastDbId(info.useMaxDbId);
env.getTxnManager().setLastTxnId(info.useMaxTxnId);
info.nRepeatIteratorReads += reader.getNRepeatIteratorReads();
} catch (Exception e) {
traceAndThrowException(reader.getLastLsn(), "readMapIns", e);
}
}