sumitagrawl commented on code in PR #5167:
URL: https://github.com/apache/ozone/pull/5167#discussion_r1290934964


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -242,7 +253,16 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
         if (null == oldKeyVersionsToDeleteMap) {
           oldKeyVersionsToDeleteMap = new HashMap<>();
         }
-        oldKeyVersionsToDeleteMap.put(delKeyName, oldVerKeyInfo);
+
+        // Remove any block from oldVerKeyInfo that share the same container ID
+        // and local ID with omKeyInfo blocks'.

Review Comment:
   Hsync flow: openKeyTable/openFileTable will have hsync flag whenever first 
commit comes with hsync feature
   1. openKeyTable: when first commit comes with hsync flag true (as hsync 
feature), it will add to metadata of open key table
   2. Multiple commits can come with hsync flag true (always)
   3. When final commit comes (with hsync flag false), it will retrive same 
flag from metadata of open key table
   
   Related to ClientId,
   - commit always retrieve omKeyInfo from with clientId as full keyName, else 
commit will fail. So there can not be any other annonymous clientId
   `String dbOpenKey = omMetadataManager.getOpenKey(volumeName, bucketName,
             keyName, commitKeyRequest.getClientID());`
   
   We can take up this as separate verifying if any other issue, and this PR 
looks good to me.
   



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