ndimiduk commented on a change in pull request #1970:
URL: https://github.com/apache/hbase/pull/1970#discussion_r450435239



##########
File path: 
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/WrapperAsyncFSOutput.java
##########
@@ -91,7 +93,11 @@ private void flush0(CompletableFuture<Long> future, 
ByteArrayOutputStream buffer
           out.hflush();
         }
       }
-      future.complete(out.getPos());
+      long pos = out.getPos();
+      if(pos > this.syncedLength) {
+        this.syncedLength = pos;

Review comment:
       This read-followedby-update also needs to be atomic, yes?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to