* we're at a file with a valid file header entry.
*/
lastValidOffset = currentEntryOffset;
nextUnprovenOffset = nextEntryOffset;
} catch (FileNotFoundException e) {
throw new EnvironmentFailureException
(envImpl,
EnvironmentFailureReason.LOG_FILE_NOT_FOUND, e);
} catch (ChecksumException e) {
LoggerUtils.fine
(logger, envImpl,
"Found checksum exception while searching for end of log. " +
"Last valid entry is at " + DbLsn.toString
(DbLsn.makeLsn(window.currentFileNum(), lastValidOffset)) +
" Bad entry is at " +
DbLsn.makeLsn(window.currentFileNum(), nextUnprovenOffset));
DbConfigManager configManager = envImpl.getConfigManager();
boolean findCommitTxn =
configManager.getBoolean
(EnvironmentParams.HALT_ON_COMMIT_AFTER_CHECKSUMEXCEPTION);
/* Find the committed transactions at the rest the log file. */
if (findCommitTxn) {
boolean committedTxnFound = findCommittedTxn();
/* If we have found a committed txn. */
if (committedTxnFound) {
throw new EnvironmentFailureException
(envImpl, EnvironmentFailureReason.FOUND_COMMITTED_TXN,
"Find committed txn after the corruption point");
}
}
}