jojochuang commented on code in PR #6054:
URL: https://github.com/apache/ozone/pull/6054#discussion_r1465779755
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockOutputStreamEntryPool.java:
##########
@@ -368,7 +371,16 @@ void hsyncKey(long offset) throws IOException {
if (keyArgs.getIsMultipartKey()) {
throw new IOException("Hsync is unsupported for multipart keys.");
} else {
- omClient.hsyncKey(keyArgs, openID);
+ if (keyArgs.getLocationInfoList().size() == 0) {
+ omClient.hsyncKey(keyArgs, openID);
+ } else {
+ ContainerBlockID lastBLockId =
keyArgs.getLocationInfoList().get(keyArgs.getLocationInfoList().size() - 1)
+ .getBlockID().getContainerBlockID();
+ if (!lastUpdatedBlockId.equals(lastBLockId)) {
+ omClient.hsyncKey(keyArgs, openID);
Review Comment:
I see.
--
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]