szetszwo commented on code in PR #4761:
URL: https://github.com/apache/ozone/pull/4761#discussion_r1206534463


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -252,8 +253,13 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
 
       // let the uncommitted blocks pretend as key's old version blocks
       // which will be deleted as RepeatedOmKeyInfo
-      OmKeyInfo pseudoKeyInfo = wrapUncommittedBlocksAsPseudoKey(uncommitted,
-          omKeyInfo);
+      OmKeyInfo pseudoKeyInfo;
+      if (isHSync) {
+        pseudoKeyInfo = null;
+      } else {
+        pseudoKeyInfo = wrapUncommittedBlocksAsPseudoKey(uncommitted,
+            omKeyInfo);
+      }

Review Comment:
   You may consider making it shorter.
   ```java
         final OmKeyInfo pseudoKeyInfo = isHSync? null
             : wrapUncommittedBlocksAsPseudoKey(uncommitted, omKeyInfo);
   ```



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