From a9ba2b6710e808821f13c8557fba501c8c236093 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" <6454655+adoroszlai@users.noreply.github.com> Date: Wed, 18 Sep 2019 02:27:08 +0200 Subject: [PATCH] HDDS-2142. OM metrics mismatch (abort multipart request) (#1461) --- .../src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java | 2 +- .../om/request/s3/multipart/S3MultipartUploadAbortRequest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index c07fa97726d..47f9df77a72 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -2834,7 +2834,7 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl .LIST_MULTIPART_UPLOAD_PARTS, auditMap)); return omMultipartUploadListParts; } catch (IOException ex) { - metrics.incNumAbortMultipartUploadFails(); + metrics.incNumListMultipartUploadPartFails(); AUDIT.logWriteFailure(buildAuditMessageForFailure(OMAction .LIST_MULTIPART_UPLOAD_PARTS, auditMap, ex)); throw ex; diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadAbortRequest.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadAbortRequest.java index bf02904c811..067ea109ebb 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadAbortRequest.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadAbortRequest.java @@ -85,6 +85,7 @@ public class S3MultipartUploadAbortRequest extends OMKeyRequest { String bucketName = keyArgs.getBucketName(); String keyName = keyArgs.getKeyName(); + ozoneManager.getMetrics().incNumAbortMultipartUploads(); OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager(); boolean acquiredLock = false; IOException exception = null; @@ -157,7 +158,6 @@ public class S3MultipartUploadAbortRequest extends OMKeyRequest { OMAction.ABORT_MULTIPART_UPLOAD, buildKeyArgsAuditMap(keyArgs), exception, getOmRequest().getUserInfo())); - if (exception == null) { LOG.debug("Abort Multipart request is successfully completed for " + "KeyName {} in VolumeName/Bucket {}/{}", keyName, volumeName,