xichen01 commented on code in PR #5644:
URL: https://github.com/apache/ozone/pull/5644#discussion_r1407053671
##########
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:
This is a problem that deserves attention
We currently generate `AuditMessages` via `buildAuditMessageForSuccess`,
etc. In the `AuditMessageForSuccess` we perform the `build` of all relevant
messages, regardless of whether or not the logs are logged.
This is probably not just a perf problem.
--
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]