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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -2209,20 +2210,12 @@ private <T extends WithParentObjectId> DeleteKeysResult 
gatherSubPathsWithIterat
     String seekFileInDB = metadataManager.getOzonePathKey(volumeId, bucketId,
         parentInfo.getObjectID(), "");
     long consumedSize = 0;
-    boolean processedSubPaths = false;
     try (TableIterator<String, ? extends KeyValue<String, T>> iterator = 
table.iterator(seekFileInDB)) {
       while (iterator.hasNext() && remainingBufLimit > 0) {
         KeyValue<String, T> entry = iterator.next();
-        T withParentObjectId = entry.getValue();
         final long objectSerializedSize = entry.getValueByteSize();
-        if 
(!OMFileRequest.isImmediateChild(withParentObjectId.getParentObjectID(),
-            parentInfo.getObjectID())) {
-          processedSubPaths = true;
-          break;
-        }
-        if (!table.isExist(entry.getKey())) {
-          continue;
-        }
+        //No need to check the table again as the value in cache and iterator 
would be same when directory

Review Comment:
   nit: missing space
   ```suggestion
           // No need to check the table again as the value in cache and 
iterator would be same when directory
   ```



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