ChenSammi commented on code in PR #10949:
URL: https://github.com/apache/ozone/pull/10949#discussion_r3764340117
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyLifecycleService.java:
##########
@@ -1109,55 +1109,93 @@ private void processMultipartUploads(OmBucketInfo
bucketInfo, List<OmLCRule> rul
upload.setCreationTime(Instant.ofEpochMilli(mpuKeyInfo.getCreationTime()));
String keyName = upload.getKeyName();
- String multipartOpenKey;
- try {
- multipartOpenKey = OMMultipartUploadUtils.getMultipartOpenKey(
- volumeName, bucketName, keyName, upload.getUploadId(),
- omMetadataManager, bucketInfo.getBucketLayout());
- } catch (OMException e) {
- LOG.warn("Failed to get multipart open key for {}/{}/{}, skipping",
- volumeName, bucketName, keyName, e);
- continue;
+ OmLCRule matchedRuleWithoutTags = null;
+ boolean needsTagMatch = false;
+ for (OmLCRule rule : ruleList) {
+ if (!passesAgeAndPrefix(upload, keyName, rule)) {
+ continue;
+ }
+ if (!rule.isTagEnable()) {
Review Comment:
This reorder the rule evaluation order. It prefer a rule without tag over a
rule with tag first.
--
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]