klsince commented on code in PR #15392:
URL: https://github.com/apache/pinot/pull/15392#discussion_r2021444459


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/BaseSegmentOperationsThrottler.java:
##########
@@ -41,17 +46,22 @@ public abstract class BaseSegmentOperationsThrottler 
implements PinotClusterConf
   protected int _maxConcurrency;
   protected int _maxConcurrencyBeforeServingQueries;
   protected boolean _isServingQueries;
+  protected ServerGauge _thresholdGauge;
+  protected ServerGauge _countGauge;
+  private AtomicInteger _numSegmentsAcquiredSemaphore;
   private final Logger _logger;
 
   /**
    * Base segment operations throttler constructor
    * @param maxConcurrency configured concurrency
    * @param maxConcurrencyBeforeServingQueries configured concurrency before 
serving queries
    * @param isServingQueries whether the server is ready to serve queries or 
not
+   * @param thresholdGauge gauge metric to track the throttle thresholds
+   * @param countGauge gauge metric to track the number of segments undergoing 
the given operation
    * @param logger logger to use
    */
   public BaseSegmentOperationsThrottler(int maxConcurrency, int 
maxConcurrencyBeforeServingQueries,
-      boolean isServingQueries, Logger logger) {
+      boolean isServingQueries, ServerGauge thresholdGauge, ServerGauge 
countGauge, Logger logger) {

Review Comment:
   is passing in the two Gauges for test purpose? as we could refer them 
directly as they are public, in fact, even in tests, we could refer them 
directly to modify/check on their values iiuc.



-- 
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-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to