ivandika3 commented on code in PR #10052:
URL: https://github.com/apache/ozone/pull/10052#discussion_r3142991690
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -743,6 +753,208 @@ private void evaluateBucket(OmBucketInfo bucketInfo,
}
}
+ /**
+ * Process AbortIncompleteMultipartUpload actions for incomplete multipart
uploads.
+ * Iterates through the multipartInfoTable and aborts uploads that match
the rule criteria
+ * and have exceeded the configured days after initiation.
+ *
+ * @param bucketInfo the bucket information
+ * @param ruleList list of lifecycle rules to evaluate
+ */
+ private void processMultipartUploads(OmBucketInfo bucketInfo,
List<OmLCRule> ruleList) {
+ // Filter rules that have AbortIncompleteMultipartUpload actions
+ List<OmLCRule> mpuRules = ruleList.stream()
+ .filter(r -> r.getAbortIncompleteMultipartUpload() != null)
+ .collect(Collectors.toList());
+
+ if (mpuRules.isEmpty()) {
+ return;
+ }
+
+ String volumeName = bucketInfo.getVolumeName();
+ String bucketName = bucketInfo.getBucketName();
+ String bucketPrefix = omMetadataManager.getMultipartKey(volumeName,
bucketName, "", "");
+
+ LOG.debug("Processing AbortIncompleteMultipartUpload actions for bucket
{}/{}", volumeName, bucketName);
+
+ LimitedSizeList<OmMultipartUpload> expiredUploads = new
LimitedSizeList<>(listMaxSize);
Review Comment:
Better to use a separate configuration (similar to
`ozone.om.open.mpu.parts.cleanup.limit.per.task`). We use parts as the limit
instead of the number of MPU since some MPU might have 1 part while others
might have 10,000 (think of a MPU part as a single normal key).
--
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]