duongkame commented on code in PR #5644:
URL: https://github.com/apache/ozone/pull/5644#discussion_r1406953836
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -264,12 +267,15 @@ public Response get(
response.setTruncated(false);
}
- AUDIT.logReadSuccess(buildAuditMessageForSuccess(s3GAction,
- getAuditParameters()));
int keyCount =
response.getCommonPrefixes().size() + response.getContents().size();
- getMetrics().updateGetBucketSuccessStats(startNanos);
+ long opLatencyNs =
+ getMetrics().updateGetBucketSuccessStats(startNanos);
getMetrics().incListKeyCount(keyCount);
+ perf.appendCount(keyCount);
+ perf.appendOpLatencyNanos(opLatencyNs);
+ AUDIT.logReadSuccess(buildAuditMessageForSuccess(s3GAction,
Review Comment:
`AUDIT` may not log reads because of performance, but the `perf` does always
`build()`. Should the performance data be passed as a lamba instead, so that a
new string is not actually built when read audi logs are not enabled?
--
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]