aryangupta1998 commented on code in PR #11021:
URL: https://github.com/apache/ozone/pull/11021#discussion_r3818810661


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -1536,19 +1544,20 @@ public OzoneManagerProtocolProtos.OMResponse run() 
throws Exception {
       }
     }
 
-    private void moveToTrash(OmBucketInfo bucket, LimitedExpiredObjectList 
keysList, boolean isDir) {
+    private int moveToTrash(OmBucketInfo bucket, LimitedExpiredObjectList 
keysList, boolean isDir) {
       if (keysList.isEmpty()) {
-        return;
+        return 0;
       }
+      int failedMoves = 0;
       String volumeName = bucket.getVolumeName();
       String bucketName = bucket.getBucketName();
       String trashRoot = TRASH_PREFIX + OM_KEY_PREFIX + bucket.getOwner();
       Path trashCurrent = new Path(trashRoot, CURRENT);
       try {
         checkAndCreateTrashDirIfNeeded(bucket, trashCurrent);
       } catch (IOException e) {
-        keysList.clear();
-        return;
+        LOG.error("Failed to prepare trash root {} for bucket {}/{}", 
trashCurrent, volumeName, bucketName, e);

Review Comment:
   My original intent is:
   
   Retry (do not advance scan state) only for failures that are likely 
transient/infrastructure-level.
   Do not retry forever (allow progress) for semantic/business-logic failures 
where replaying the same rename input is not expected to succeed.
   For RenameKey in current OM FSO path, I’m thinking:
   
   Non-retryable / should not block scan progress
   
   KEY_NOT_FOUND
   FILE_NOT_FOUND
   DIRECTORY_NOT_FOUND
   UPDATE_ID_NOT_MATCH
   KEY_ALREADY_EXISTS
   INVALID_KEY_NAME
   RENAME_OPEN_FILE
   BUCKET_NOT_FOUND / VOLUME_NOT_FOUND (if surfaced)
   
   Retryable / should block scan progress (no scan advance)
   
   request submit/preExecute IO failures
   leader/ratis/service unavailability/timeouts
   internal/server errors that may succeed on next run



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