diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-09-21 23:44:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-21 23:44:55 +0200 |
commit | 1b688e7a77055d555c8fbe90856593b15c10cfa8 (patch) | |
tree | 3220ef4dd818a2127f714b90a93809891eec1a85 /metrics-proxy/src/main/java/ai/vespa/metricsproxy | |
parent | 16c799289d15eb30f55675373b254210396fad17 (diff) | |
parent | 643c51d6d7fce92d5f0703acf9e09e25a7408337 (diff) |
Merge pull request #19233 from vespa-engine/balder/do-not-poll-default-unless-requested-to-do-sov7.470.24
Do not fetch metrics for default consumer unless explicitly asked to …
Diffstat (limited to 'metrics-proxy/src/main/java/ai/vespa/metricsproxy')
-rw-r--r-- | metrics-proxy/src/main/java/ai/vespa/metricsproxy/http/application/ApplicationMetricsRetriever.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/http/application/ApplicationMetricsRetriever.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/http/application/ApplicationMetricsRetriever.java index 1bbda1a463c..2603b9025c2 100644 --- a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/http/application/ApplicationMetricsRetriever.java +++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/http/application/ApplicationMetricsRetriever.java @@ -63,7 +63,6 @@ public class ApplicationMetricsRetriever extends AbstractComponent implements Ru taskTimeout = timeout(clients.size()); stopped = false; consumerSet = new HashSet<>(); - consumerSet.add(defaultMetricsConsumerId); httpClient.start(); pollThread = new Thread(this, "metrics-poller"); pollThread.setDaemon(true); @@ -114,7 +113,7 @@ public class ApplicationMetricsRetriever extends AbstractComponent implements Ru super.deconstruct(); } - public Map<Node, List<MetricsPacket>> getMetrics() { + Map<Node, List<MetricsPacket>> getMetrics() { return getMetrics(defaultMetricsConsumerId); } @@ -141,7 +140,8 @@ public class ApplicationMetricsRetriever extends AbstractComponent implements Ru } long before = pollCount; pollThread.notifyAll(); - while (pollCount == before) { + while (pollCount <= before + 1) { + pollThread.notifyAll(); pollThread.wait(); } } |