ChenSammi commented on code in PR #11021:
URL: https://github.com/apache/ozone/pull/11021#discussion_r3818348177
##########
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:
Can you list which can be retried, and which cannot? so I can have a better
idea of your original intent.
--
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]