You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "tibrewalpratik17 (via GitHub)" <gi...@apache.org> on 2024/02/20 19:56:20 UTC

Re: [PR] [Adaptive Server Selector] Add metrics for Stats Manager Queue Size [pinot]

tibrewalpratik17 commented on code in PR #12340:
URL: https://github.com/apache/pinot/pull/12340#discussion_r1496405851


##########
pinot-core/src/main/java/org/apache/pinot/core/transport/server/routing/stats/ServerRoutingStatsManager.java:
##########
@@ -377,4 +389,15 @@ public Double fetchHybridScoreForServer(String server) {
       stats.getServerReadLock().unlock();
     }
   }
+
+  private void recordQueueSizeMetrics() {
+    int queueSize = getQueueSize();
+    _brokerMetrics.setValueOfGlobalGauge(BrokerGauge.ROUTING_STATS_MANAGER_QUEUE_SIZE, queueSize);
+    if (queueSize > _executorQueueSizeWarnThreshold) {
+      _brokerMetrics.addMeteredGlobalValue(BrokerMeter.ROUTING_STATS_MANAGER_Q_LIMIT_REACHED, 1L);
+      LOGGER.warn(String.format("Stats Manager queue size exceeds warn threshold = %d. "
+              + "Current queue size = %d, completed task count = %d.",
+          _executorQueueSizeWarnThreshold, queueSize, getCompletedTaskCount()));

Review Comment:
   This can lead to a lot of logs during high-qps use-cases, isn't 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: 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