int file_id = (int) (ByteTool.bytesToShort(stateValue, 0, true));
int off_set = ByteTool.bytesToInt(stateValue, 2, true);
if (file_id >= FIRSTREC_FILEID && off_set != FIRSTREC_PREVOFFSET) {
chkpt = new Lsn(file_id, off_set);
LogRecord cursorLogRecord = get(chkpt);
TxnCkpLogRecord logRec = (TxnCkpLogRecord) cursorLogRecord;
lastChkpt = logRec.getLastCkpLsn();
}
} catch (Exception e) {
logger.error(e);
Lsn cursorLsn = new Lsn(lastLsnInFlush);
LogRecord cursorLogRecord = null;
boolean isEnd = false;
while (!isEnd) {
try {
cursorLogRecord = get(cursorLsn);
} catch (ChaiDBException e1) {
throw e1;
}
if (cursorLogRecord.getType() == LogRecord.LOG_TXN_CHECKPOINT || cursorLogRecord.getType() == LogRecord.LOG_TXN_FUZZY_CHECKPOINT) {
chkpt = cursorLsn;
TxnCkpLogRecord logRec = (TxnCkpLogRecord) cursorLogRecord;
lastChkpt = logRec.getLastCkpLsn();//modified by marriane 2002-10-16
isEnd = true;
}
if (cursorLsn.getOffset() == LogManager.FIRSTREC_PREVOFFSET) {
isEnd = true;