ivankelly commented on a change in pull request #1225: Issue #570: getting rid
of unnecessary synchrnoization in InterleavedLedgerStorage
URL: https://github.com/apache/bookkeeper/pull/1225#discussion_r171811434
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
##########
@@ -360,10 +362,10 @@ public void checkpoint(Checkpoint checkpoint) throws
IOException {
@Override
public synchronized void flush() throws IOException {
- if (!somethingWritten) {
+ if (!somethingWritten.get()) {
Review comment:
Use a compareAndSet here.
Do we need synchronization on the flush method at all?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services