smengcl commented on code in PR #4486:
URL: https://github.com/apache/ozone/pull/4486#discussion_r1153708795


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -1422,6 +1423,14 @@ public List<BlockGroup> getPendingDeletionKeys(final int 
keyCount)
             //  4. Further optimization: Skip all snapshotted keys altogether
             //  e.g. by prefixing all unreclaimable keys, then calling seek
 
+            // If the bucket is a snapshot bucket then we should not process
+            // entries related to the snapshot from the deletedTable.
+            boolean isSnapshotBucket =
+                OMClientRequestUtils.isSnapshotBucket(this, info);
+            if (isSnapshotBucket) {
+              break;
+            }

Review Comment:
   Oh I see. I misunderstood earlier.
   
   However, we are not still not checking whether the key can be **actually** 
reclaimed or not in active FS. For example, in the following case `key2` is not 
reclaimed (but can be):
   
   1. Taken `snap1` on `/vol1/buck1/`.
   2. Create new key `/vol1/buck1/key2`
   3. Delete key `/vol1/buck1/key2` just created. Thus `/vol1/buck1/key2` is 
appended to active `deletedTable`.
   4. With the current logic, `/vol1/buck1/key2` won't be reclaimed by KDT.



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