exist icon indicating copy to clipboard operation
exist copied to clipboard

Insufficient synchronization in Journal.java

Open adamretter opened this issue 6 years ago • 1 comments

There is insufficient synchronization on the currentBuffer field in Journal.java, sometimes it is accessed under synchronized block:

  1. Journal#writeToLog(Loggable) -> currentBuffer...
  2. Journal#flushToLog(Loggable) -> Journal#flushBuffer() -> currentBuffer...

...and other times it is NOT, e.g.:

  1. Journal#checkpoint(long, boolean) -> Journal#flushBuffer() -> currentBuffer...
  2. Journal#shutdown(long, boolean) -> Journal#flushBuffer() -> currentBuffer...

adamretter avatar Nov 28 '18 03:11 adamretter