Background errors during write to the WAL are converted to the errors during atomic operation. NPE is fixed.
@@ -398,12 +398,12 @@ public final class CASDiskWriteAheadLog implements OWriteAheadLog {
writeBufferTwo = writeBufferPointerTwo.getNativeByteBuffer().order(ByteOrder.nativeOrder());
assert writeBufferTwo.position() == 0;
- log(new EmptyWALRecord());
-
this.recordsWriterFuture =
commitExecutor.scheduleWithFixedDelay(
new RecordsWriter(false, false), commitDelay, commitDelay, TimeUnit.MILLISECONDS);
+ log(new EmptyWALRecord());
+
flush();
}
