tanvipenumudy commented on code in PR #6321:
URL: https://github.com/apache/ozone/pull/6321#discussion_r1510650673
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java:
##########
@@ -121,13 +124,15 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
.setVolumeName(volumeName).setBucketName(bucketName);
boolean deleteStatus = true;
+ long startNanos = Time.monotonicNowNanos();
try {
+ long startNs = Time.monotonicNowNanos();
Review Comment:
Similar to the above comment, we can rename the variable to indicate the
latency it is capturing.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java:
##########
@@ -215,20 +222,22 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
}
addDeletedKeys(auditMap, deleteKeys, unDeletedKeys.getKeysList());
-
+ long endNanos = Time.monotonicNowNanos();
Review Comment:
Again, this can be added within the `finally` block or you may also have
separate `endNanos` for both success and failure latencies (adjacent to
`Result.Success`/`Result.Failure`).
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java:
##########
@@ -153,13 +158,15 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
try {
// check Acl
+ long startNano = Time.monotonicNowNanos();
Review Comment:
Same as the above comments.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java:
##########
@@ -121,13 +124,15 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
.setVolumeName(volumeName).setBucketName(bucketName);
boolean deleteStatus = true;
+ long startNanos = Time.monotonicNowNanos();
Review Comment:
Since there are multiple variables defined: `startNanos`, `startNs`,
`startNano`, it should be a good idea to rename these variables based off of
the latency they are capturing, maybe something like:
`startNanosDeleteKeySuccessLatencyNs`.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyDeleteRequest.java:
##########
@@ -186,18 +191,20 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
omClientResponse.setOmLockDetails(getOmLockDetails());
}
}
-
+ long endNanos = Time.monotonicNowNanos();
Review Comment:
I think this can be added within the `finally` block or you may also have
separate `endNanos` for both success and failure latencies (can be added
adjacent to `Result.Success`/`Result.Failure`).
--
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]