li4wang commented on code in PR #2279:
URL: https://github.com/apache/zookeeper/pull/2279#discussion_r2226190582


##########
zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java:
##########
@@ -714,14 +714,21 @@ public Thread newThread(final Runnable runnable) {
         }
     }
 
+    private static class PrometheusRejectedExecutionHandler implements 
RejectedExecutionHandler {
+        private static boolean maxQueueSizeExceeded = false;
+
+        @Override
+        public void rejectedExecution(final Runnable r, final 
ThreadPoolExecutor e) {
+            if (!maxQueueSizeExceeded) {
+                maxQueueSizeExceeded = true;
+                LOG.warn("Prometheus metrics queue size exceeded the max");

Review Comment:
   The rate limit logger was dropped based on the following two considerations:
   
   1. To avoid the unnecessary overhead of logging the same warn msg repeatedly 
even it's rate limited
   2. It's important to know whether rejection happens, but don't see too much 
benefits for knowing when the rejection stops and restarts.
   
   We can add the rate limit logger back if there is a strong preference to 
have it. @kezhuw  



-- 
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: notifications-unsubscr...@zookeeper.apache.org

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

Reply via email to