if (frc == null) {
frc = FrControlFile.createControlFile(logPath);
}
SafeUpdateUtils bu = new SafeUpdateUtils();
try {
bu.backupFiles(new String[]{frc.getControlFilePath()}, "icb");
} catch (IOException e) {
throw new ChaiDBException(ErrorCode.RECOVER_ERROR_BASE, "Can't backup " + frc.getControlFilePath());
}
try {
frc.setLastLsn(prevLastLsn.toString());
frc.setLastSLsn(lastSLsn.toString());
frc.writeToDisk();
} finally {
bu.clearFiles();
}
}