soumitra-st commented on code in PR #11884:
URL: https://github.com/apache/pinot/pull/11884#discussion_r1373815094
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -417,14 +417,16 @@ protected BrokerResponse handleRequest(long requestId,
String query, @Nullable S
boolean hasTableAccess =
accessControl.hasAccess(requesterIdentity, serverBrokerRequest) &&
accessControl.hasAccess(httpHeaders,
TargetType.TABLE, tableName, Actions.Table.QUERY);
+
+ _brokerMetrics.addPhaseTiming(rawTableName,
BrokerQueryPhase.AUTHORIZATION,
+ System.nanoTime() - compilationEndTimeNs);
+
if (!hasTableAccess) {
_brokerMetrics.addMeteredTableValue(tableName,
BrokerMeter.REQUEST_DROPPED_DUE_TO_ACCESS_ERROR, 1);
LOGGER.info("Access denied for request {}: {}, table: {}", requestId,
query, tableName);
requestContext.setErrorCode(QueryException.ACCESS_DENIED_ERROR_CODE);
throw new WebApplicationException("Permission denied",
Response.Status.FORBIDDEN);
}
- _brokerMetrics.addPhaseTiming(rawTableName,
BrokerQueryPhase.AUTHORIZATION,
Review Comment:
Yes it should, I will fix that in another PR.
--
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]