fmorg-git commented on code in PR #10203:
URL: https://github.com/apache/ozone/pull/10203#discussion_r3463386485


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/BlockDataStreamOutputEntryPool.java:
##########
@@ -254,8 +255,9 @@ void commitKey(long offset) throws IOException {
       if (keyArgs.getIsMultipartKey()) {
         commitUploadPartInfo =
             omClient.commitMultipartUploadPart(buildKeyArgs(), openID);
+        modificationTime = commitUploadPartInfo.getModificationTime();
       } else {
-        omClient.commitKey(buildKeyArgs(), openID);
+        modificationTime = omClient.commitKey(buildKeyArgs(), openID);

Review Comment:
   yes, that's good observation that `modificationTime` would be 0 if the 
commit fails, and it is correct that `modificationTime` is only accessed after 
the commit is successful.  One disadvantage with using `Long` is autoboxing and 
generating unnecessary `Long` objects, so I'm ok to leave as is (and I think it 
sounds like you are as well)



-- 
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]

Reply via email to