smengcl commented on code in PR #6968:
URL: https://github.com/apache/ozone/pull/6968#discussion_r1688501447
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java:
##########
@@ -640,6 +655,13 @@ private void handleFlushInternal(boolean close)
}
LOG.debug("Flush done.");
}
+
+ if (close) {
+ // When closing, must wait for all flush futures to complete.
+ for (CompletableFuture<Void> flushFuture : allPendingFlushFutures) {
+ flushFuture.get();
+ }
+ }
Review Comment:
Thanks @duongkame for the patch.
> When hsync is called concurrently, lastFlushFuture completion does not
guarantee that all the preceeded flushFutures complete.
Does this imply that even for the same `BlockOutputStream` for a key. It is
possible that the future can return in a non-sequential order?
Isn't it supposed to be serialized on Raft server on datanode end?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]