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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -1543,17 +1535,14 @@ public List<BlockGroup> getPendingDeletionKeys(final 
int keyCount,
               // have to check deletedTable of previous snapshot
               RepeatedOmKeyInfo delOmKeyInfo =
                   prevDeletedTable.get(prevDelTableDBKey);
-              if ((omKeyInfo != null &&
-                  info.getObjectID() == omKeyInfo.getObjectID()) ||
-                  delOmKeyInfo != null) {
-                // TODO: [SNAPSHOT] For now, we are not cleaning up a key in
-                //  active DB's deletedTable if any one of the keys in
-                //  RepeatedOmKeyInfo exists in last snapshot's key/fileTable.
-                //  Might need to refactor OMKeyDeleteRequest first to take
-                //  actual reclaimed key objectIDs as input
-                //  in order to avoid any race condition.
-                blockGroupList.clear();
-                break;
+              if (versionExistsInPreviousSnapshot(omKeyInfo,
+                  info, delOmKeyInfo)) {
+                // If the infoList size is 1, there is nothing to split.
+                // We either delete it or skip it.
+                if (!(infoList.getOmKeyInfoList().size() == 1)) {

Review Comment:
   It is being added to `notReclaimableKeyInfo`,  
   ```
   if (!(infoList.getOmKeyInfoList().size() == 1))
   ```
   This here is checking for the case where size != 1, which also means size > 
1. 



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