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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -339,47 +333,54 @@ private void evaluateFSOBucket(OmVolumeArgs volume, 
OmBucketInfo bucket, String
           continue;
         }
         // use last directory's object ID to iterate the keys
-        String prefix = OzoneConsts.OM_KEY_PREFIX + volume.getObjectID() +
-            OzoneConsts.OM_KEY_PREFIX + bucket.getObjectID() + 
OzoneConsts.OM_KEY_PREFIX;
+        String prefix = OM_KEY_PREFIX + volume.getObjectID() +
+            OM_KEY_PREFIX + bucket.getObjectID() + OM_KEY_PREFIX;
         StringBuffer directoryPath = new StringBuffer();
         if (!dirList.isEmpty()) {
           prefix += dirList.get(dirList.size() - 1).getObjectID();
           for (OmDirectoryInfo dir : dirList) {
-            
directoryPath.append(dir.getName()).append(OzoneConsts.OM_KEY_PREFIX);
+            directoryPath.append(dir.getName()).append(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());
+          if (directoryPath.toString().equals(rule.getEffectivePrefix() + 
OM_KEY_PREFIX)) {
+            if (!expiredDirList.add(directoryPath.toString(), 
dirList.get(dirList.size() - 1).getUpdateID())) {

Review Comment:
   directoryPath is checked against the rule on L344. 



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