You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "priyen-stripe (via GitHub)" <gi...@apache.org> on 2025/11/12 21:24:37 UTC
Re: [PR] add gauges + rejections counter for mse thread usage and limit when the limiting feature is used [pinot]
priyen-stripe commented on code in PR #17198:
URL: https://github.com/apache/pinot/pull/17198#discussion_r2519862816
##########
pinot-spi/src/main/java/org/apache/pinot/spi/executor/HardLimitExecutor.java:
##########
@@ -38,12 +39,21 @@ public class HardLimitExecutor extends DecoratorExecutorService {
private final AtomicInteger _running;
private final int _max;
private final QueryThreadExceedStrategy _exceedStrategy;
+ private final Consumer<Integer> _currentUsageGaugeUpdater;
- public HardLimitExecutor(int max, ExecutorService executorService, QueryThreadExceedStrategy exceedStrategy) {
+ public HardLimitExecutor(int max, ExecutorService executorService, QueryThreadExceedStrategy exceedStrategy,
+ Consumer<Integer> maxUsageGaugeUpdater, Consumer<Integer> currentUsageGaugeUpdater) {
super(executorService);
_running = new AtomicInteger(0);
_max = max;
_exceedStrategy = exceedStrategy;
+ _currentUsageGaugeUpdater = currentUsageGaugeUpdater;
+ maxUsageGaugeUpdater.accept(max);
+ _currentUsageGaugeUpdater.accept(0);
+ }
+
+ public HardLimitExecutor(int max, ExecutorService executorService, QueryThreadExceedStrategy exceedStrategy) {
+ this(max, executorService, exceedStrategy, max1 -> { }, current -> { });
Review Comment:
hmm I am running checkstyle it is getting 0 validations
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org