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


##########
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:
   > 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
   
   From all these cases, client side timeout is the one that retry might be 
succeed, others it's not suggested to do the retry blindly.  For client side 
timeout, it's usually because of server's too busy, there are too many requests 
holding on the server side to handle, so usually we use some backoff algorithm 
to do the retry, instead of retry immediately.  It's been considered during the 
service implementation.  Since the service is running periodically, it 
naturally covers the retry case. We felt there was very less benefit to 
increase the complexity to add new logic to handle the timeout explicitly.  So 
let's not do the retry. 



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