aswinshakil commented on code in PR #4811:
URL: https://github.com/apache/ozone/pull/4811#discussion_r1230124250


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -1571,11 +1560,33 @@ public List<BlockGroup> getPendingDeletionKeys(final 
int keyCount,
             }
             currentCount++;
           }
-          keyBlocksList.addAll(blockGroupList);
+
+          List<OmKeyInfo> notReclaimableKeyInfoList =
+              notReclaimableKeyInfo.getOmKeyInfoList();
+
+          // If all the versions are not reclaimable, then do nothing.
+          if (notReclaimableKeyInfoList.size() > 0 &&

Review Comment:
   For case 2, if all versions are reclaimable then notReclaimableKeyInfoList 
will be 0. So it will be added to `keyBlocksList` and it will be deleted by the 
PurgeRequest 
   ```
    if (notReclaimableKeyInfoList.size() !=
         infoList.getOmKeyInfoList().size()) {
       keyBlocksList.addAll(blockGroupList);
     }
   ```
   3) I don't see a case where we only delete a few blocks in `OMKeyInfo`. Let 
me know if there is some case.



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