You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by li...@apache.org on 2025/09/04 17:52:58 UTC
(zookeeper) branch master updated: ZOOKEEPER-4951: Optimize the default Prometheus max queue size (#2278)
This is an automated email from the ASF dual-hosted git repository.
li4wang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 7c414c12b ZOOKEEPER-4951: Optimize the default Prometheus max queue size (#2278)
7c414c12b is described below
commit 7c414c12b5c59e64aa9c52277396f4c42032ca48
Author: li4wang <68...@users.noreply.github.com>
AuthorDate: Thu Sep 4 10:52:51 2025 -0700
ZOOKEEPER-4951: Optimize the default Prometheus max queue size (#2278)
Author: Li Wang <li...@apple.com>
Reviewer: kezhuw <ke...@apache.org>
---
zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md | 2 +-
.../zookeeper/metrics/prometheus/PrometheusMetricsProvider.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md b/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
index 5bac829cf..b14cb6b86 100644
--- a/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
+++ b/zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
@@ -2279,7 +2279,7 @@ options are used to configure the [AdminServer](#sc_adminserver).
* *metricsProvider.maxQueueSize* :
**New in 3.7.1:**
The max queue size for Prometheus summary metrics reporting task.
- Default value is 1000000.
+ Default value is 10000.
* *metricsProvider.workerShutdownTimeoutMs* :
**New in 3.7.1:**
diff --git a/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java b/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java
index d41b0ad5a..3745a753c 100644
--- a/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java
+++ b/zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java
@@ -84,7 +84,7 @@ public class PrometheusMetricsProvider implements MetricsProvider {
/**
* The max queue size for Prometheus summary metrics reporting task.
- * Default value is 1000000.
+ * Default value is 10000.
*/
static final String MAX_QUEUE_SIZE = "maxQueueSize";
@@ -111,7 +111,7 @@ public class PrometheusMetricsProvider implements MetricsProvider {
private final MetricsServletImpl servlet = new MetricsServletImpl();
private final Context rootContext = new Context();
private int numWorkerThreads = 1;
- private int maxQueueSize = 1000000;
+ private int maxQueueSize = 10000;
private long workerShutdownTimeoutMs = 1000;
private Optional<ExecutorService> executorOptional = Optional.empty();
@@ -161,7 +161,7 @@ public void configure(Properties configuration) throws MetricsProviderLifeCycleE
this.numWorkerThreads = Integer.parseInt(
configuration.getProperty(NUM_WORKER_THREADS, "1"));
this.maxQueueSize = Integer.parseInt(
- configuration.getProperty(MAX_QUEUE_SIZE, "1000000"));
+ configuration.getProperty(MAX_QUEUE_SIZE, "10000"));
this.workerShutdownTimeoutMs = Long.parseLong(
configuration.getProperty(WORKER_SHUTDOWN_TIMEOUT_MS, "1000"));
}