HDDS-2142. OM metrics mismatch (abort multipart request) (#1461)
This commit is contained in:
parent
3cf6e4272f
commit
a9ba2b6710
|
@ -2834,7 +2834,7 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
|
||||||
.LIST_MULTIPART_UPLOAD_PARTS, auditMap));
|
.LIST_MULTIPART_UPLOAD_PARTS, auditMap));
|
||||||
return omMultipartUploadListParts;
|
return omMultipartUploadListParts;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
metrics.incNumAbortMultipartUploadFails();
|
metrics.incNumListMultipartUploadPartFails();
|
||||||
AUDIT.logWriteFailure(buildAuditMessageForFailure(OMAction
|
AUDIT.logWriteFailure(buildAuditMessageForFailure(OMAction
|
||||||
.LIST_MULTIPART_UPLOAD_PARTS, auditMap, ex));
|
.LIST_MULTIPART_UPLOAD_PARTS, auditMap, ex));
|
||||||
throw ex;
|
throw ex;
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class S3MultipartUploadAbortRequest extends OMKeyRequest {
|
||||||
String bucketName = keyArgs.getBucketName();
|
String bucketName = keyArgs.getBucketName();
|
||||||
String keyName = keyArgs.getKeyName();
|
String keyName = keyArgs.getKeyName();
|
||||||
|
|
||||||
|
ozoneManager.getMetrics().incNumAbortMultipartUploads();
|
||||||
OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
|
OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
|
||||||
boolean acquiredLock = false;
|
boolean acquiredLock = false;
|
||||||
IOException exception = null;
|
IOException exception = null;
|
||||||
|
@ -157,7 +158,6 @@ public class S3MultipartUploadAbortRequest extends OMKeyRequest {
|
||||||
OMAction.ABORT_MULTIPART_UPLOAD, buildKeyArgsAuditMap(keyArgs),
|
OMAction.ABORT_MULTIPART_UPLOAD, buildKeyArgsAuditMap(keyArgs),
|
||||||
exception, getOmRequest().getUserInfo()));
|
exception, getOmRequest().getUserInfo()));
|
||||||
|
|
||||||
|
|
||||||
if (exception == null) {
|
if (exception == null) {
|
||||||
LOG.debug("Abort Multipart request is successfully completed for " +
|
LOG.debug("Abort Multipart request is successfully completed for " +
|
||||||
"KeyName {} in VolumeName/Bucket {}/{}", keyName, volumeName,
|
"KeyName {} in VolumeName/Bucket {}/{}", keyName, volumeName,
|
||||||
|
|
Loading…
Reference in New Issue