* 1.find smallest begin_lsn of all active txns
* 2.add fuzzy checkpoint log record
* 3.flush btrees
*/
public void doCheckpoint(boolean sync) throws ChaiDBException {
Lsn lastCkp = null;
Lsn ckpLsn = null;
Lsn smallestLsn = txnManager.getSmallestLsnOfAllActiveTxn();
if (!sync && !txnManager.getLogManager().needCheckpoint()) {
txnManager.setTimeCkp(System.currentTimeMillis());
logger.info("Checkpoint thread found there is no new log from " + "the time of last checkpoint. Current checkpoint " + "process will abort.");