aryangupta1998 commented on code in PR #11021:
URL: https://github.com/apache/ozone/pull/11021#discussion_r3816145529
##########
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:
I agree with the concern about hardcoding only a small status allowlist in
KeyLifecycleService, since rename semantics in OMKeyRenameRequestWithFSO can
evolve and unexpectedly turn into task-aborting behavior.
My intent with HDDS-16162 is to avoid advancing scan state on
retryable/system move-to-trash failures (so failed entries are retried), while
still allowing progress for semantic/idempotent rename outcomes that are not
useful to retry (for example already-moved / missing-source, and similar
non-retryable conflicts).
I can revise this to a middle-ground:
keep strict retry (no scan advance) for retryable infra/system failures,
avoid aborting the whole LifecycleActionTask for non-retryable rename
outcomes,
and make the classification explicit/documented so it does not depend on
fragile case-by-case checks here.
For the trash-root init path (1558-1560), I can throw the IOException upward
directly so task abort is explicit at the failure point.
--
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]