gortiz commented on code in PR #17419:
URL: https://github.com/apache/pinot/pull/17419#discussion_r2653501379
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -136,6 +137,11 @@ public class MultiStageBrokerRequestHandler extends
BaseBrokerRequestHandler {
protected final long _extraPassiveTimeoutMs;
protected final boolean _enableQueryFingerprinting;
+ protected final PinotMeter _stagesStartedMeter =
BrokerMeter.MSE_STAGES_STARTED.getGlobalMeter();
+ protected final PinotMeter _stagesFinishedMeter =
BrokerMeter.MSE_STAGES_COMPLETED.getGlobalMeter();
+ protected final PinotMeter _opchainsStartedMeter =
BrokerMeter.MSE_OPCHAINS_STARTED.getGlobalMeter();
+ protected final PinotMeter _opchainsCompletedMeter =
BrokerMeter.MSE_OPCHAINS_COMPLETED.getGlobalMeter();
Review Comment:
The attribute in the parent class is actually final and initialized to the
value used here (the one returned by `BrokerMetrics.get()`).
In general, the idea is to use `BrokerMetrics.get()` whenever possible. We
should also keep the meters as attributes, as I'm doing here, to speed up calls
(since we don't need to look up the meter each time). In
`BaseBrokerRequestHandler` we use the old pattern, where we have an attribute
for `BrokerMetrics` but look for the metric each time we need to modify it.
--
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]