if (entryTargets[idx] == null) {
/* Fault object in from log. */
long lsn = getLsn(idx);
if (lsn == DbLsn.NULL_LSN) {
if (!isEntryKnownDeleted(idx)) {
throw new DatabaseException(makeFetchErrorMsg
("NULL_LSN without KnownDeleted", this, lsn,
entryStates[idx]));
}
/*
* Ignore a NULL_LSN (return null) if KnownDeleted is set.
* This is the remnant of an incomplete insertion -- see
* Tree.insert. [#13126]
*/
} else {
try {
EnvironmentImpl env = databaseImpl.getDbEnvironment();
Node node = (Node) env.getLogManager().get(lsn);
node.postFetchInit(databaseImpl, lsn);
entryTargets[idx] = node;
updateMemorySize(null, node);
} catch (LogFileNotFoundException LNFE) {
if (!isEntryKnownDeleted(idx) &&
!isEntryPendingDeleted(idx)) {
throw new DatabaseException
(makeFetchErrorMsg(LNFE.toString(),
this,
lsn,
entryStates[idx]));
}
/*
* Ignore. Cleaner got to the log file, so just return
* null. It is safe to ignore a deleted file for a
* pendingDeleted entry because the cleaner will not clean
* files with active transactions.
*/
} catch (Exception e) {
throw new DatabaseException
(makeFetchErrorMsg(e.toString(), this, lsn,
entryStates[idx]),
e);
}
}