}
WriteCommand controlRecord = currentBatch.prepareBatch();
writeRecord.getLocation().setDataFileId(file.getDataFileId());
writeRecord.getLocation().setPointer(currentBatch.incrementAndGetPointer());
writeRecord.getLocation().setLatch(currentBatch.getLatch());
currentBatch.appendBatch(writeRecord);
if (!writeRecord.isSync()) {
journal.getInflightWrites().put(controlRecord.getLocation(), controlRecord);
journal.getInflightWrites().put(writeRecord.getLocation(), writeRecord);
nextWriteBatch = currentBatch;
} else {