aswinshakil commented on code in PR #4811:
URL: https://github.com/apache/ozone/pull/4811#discussion_r1232491692
##########
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 &&
+ notReclaimableKeyInfoList.size() !=
+ infoList.getOmKeyInfoList().size()) {
+ keysToModify.put(kv.getKey(), notReclaimableKeyInfo);
+ }
+
+ if (notReclaimableKeyInfoList.size() !=
+ infoList.getOmKeyInfoList().size()) {
+ keyBlocksList.addAll(blockGroupList);
+ }
}
}
}
- return keyBlocksList;
+ return new PendingKeysDeletion(keyBlocksList, keysToModify);
+ }
+
+ private boolean versionExistsInPreviousSnapshot(OmKeyInfo omKeyInfo,
+ OmKeyInfo info, RepeatedOmKeyInfo delOmKeyInfo) {
+ return (omKeyInfo != null &&
Review Comment:
Thanks for the explanation. I will update the PR to have a hsync check.
--
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]