aswinshakil commented on code in PR #4407:
URL: https://github.com/apache/ozone/pull/4407#discussion_r1140761630
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java:
##########
@@ -182,13 +199,18 @@ public BackgroundTaskResult call() throws Exception {
String snapshotBucketKey = dbBucketKey + OzoneConsts.OM_KEY_PREFIX;
iterator.seek(snapshotBucketKey);
- while (deletedIterator.hasNext()) {
+ int deletionCount = 0;
+ while (deletedIterator.hasNext() &&
+ deletionCount <= keyLimitPerSnapshot) {
Table.KeyValue<String, RepeatedOmKeyInfo>
deletedKeyValue = deletedIterator.next();
String deletedKey = deletedKeyValue.getKey();
// Exit if it is out of the bucket scope.
if (!deletedKey.startsWith(snapshotBucketKey)) {
+ // If snapshot deletedKeyTable doesn't have any
+ // entry in the snapshot scope it can be reclaimed
+ purgeSnapshotKeys.add(snapInfo.getTableKey());
break;
}
Review Comment:
We should add once we are done with changes in the
`DirectoryDeletingService`, will update the PR.
--
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]