xichen01 commented on code in PR #8909:
URL: https://github.com/apache/ozone/pull/8909#discussion_r2280931652


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -348,16 +350,22 @@ private void evaluateFSOBucket(OmVolumeArgs volume, 
OmBucketInfo bucket, String
             
directoryPath.append(dir.getName()).append(OzoneConsts.OM_KEY_PREFIX);
           }
           if (directoryPath.toString().equals(rule.getEffectivePrefix() + 
OzoneConsts.OM_KEY_PREFIX)) {
-            expiredDirList.add(directoryPath.toString());
-            expiredDirUpdateIDList.add(dirList.get(dirList.size() - 
1).getUpdateID());
+            try {
+              expiredDirUpdateIDList.add(dirList.get(dirList.size() - 
1).getUpdateID());
+              expiredDirList.add(directoryPath.toString());
+            } catch (IOException e) {
+              // send delete request for pending deletion directories
+              sendDeleteKeysRequestAndClearList(volume.getVolume(), 
bucket.getBucketName(),

Review Comment:
   It's also possible, but I think isFull may look more intuitive.
   
   like: 
   ```java
               if (dirList.isFull()) {
                 sendDeleteKeysRequestAndClearList(volumeName, bucketName, 
dirList, true);
               }
               dirList.add(dirPath, dir.getUpdateID());
   ```



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to