You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/10 04:51:08 UTC

[GitHub] [hbase] comnetwork commented on a change in pull request #2034: Backport "HBASE-24625 AsyncFSWAL.getLogFileSizeIfBeingWritten does not return the expected synced file length. (#1970)" to branch-2

comnetwork commented on a change in pull request #2034:
URL: https://github.com/apache/hbase/pull/2034#discussion_r452620566



##########
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) {

Review comment:
       Yes, I agree with you, and even the 'if(pos > this.syncedLength) {' could be removed as @Apache9  suggested, but the current PR is backport ,so we'd better keep it in sync with the one applied to master.After this PR is applied to 2.x, I would open a addnum PR for both master and 2.x to incorporate your suggestions.




----------------------------------------------------------------
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:
users@infra.apache.org