summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2022-02-17 21:57:54 +0100
committerGitHub <noreply@github.com>2022-02-17 21:57:54 +0100
commite036cfe803b94b343cc41a1a80b07115fdbeb0ce (patch)
treef1d877a83a10c78f5a858dad548687fe526d24bf
parent4eacb92c9fc581d8dcd6e5b4fa73c0f47beb5005 (diff)
parentfe11e4572595d199c1c8941921489edc73ff5058 (diff)
Merge pull request #21264 from vespa-engine/balder/run-config-poll-at-1-tenth-of-vespa-timer-hz
Run config proxy configpoller at 1/10th of default(1000hz) vespa timeā€¦
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java3
-rw-r--r--vespajlib/src/main/java/com/yahoo/concurrent/SystemTimer.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
index c09a868a786..9fa0a515abc 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.config.proxy;
import com.yahoo.concurrent.DaemonThreadFactory;
+import com.yahoo.concurrent.SystemTimer;
import com.yahoo.config.ConfigurationRuntimeException;
import com.yahoo.config.subscription.ConfigSourceSet;
import com.yahoo.config.subscription.impl.JrtConfigRequesters;
@@ -67,7 +68,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
this.memoryCache = new MemoryCache();
this.delayedResponses = new DelayedResponses();
checkConfigSources();
- nextConfigFuture = nextConfigScheduler.scheduleAtFixedRate(this, 0, 10, MILLISECONDS);
+ nextConfigFuture = nextConfigScheduler.scheduleAtFixedRate(this, 0, 10*1000/SystemTimer.detectHz(), MILLISECONDS);
this.requesters = new JrtConfigRequesters();
DelayedResponseHandler command = new DelayedResponseHandler(delayedResponses, memoryCache, responseHandler);
this.delayedResponsesFuture = delayedResponsesScheduler.scheduleAtFixedRate(command, 5, 1, SECONDS);
diff --git a/vespajlib/src/main/java/com/yahoo/concurrent/SystemTimer.java b/vespajlib/src/main/java/com/yahoo/concurrent/SystemTimer.java
index 01abcc0d610..ecaae5e6387 100644
--- a/vespajlib/src/main/java/com/yahoo/concurrent/SystemTimer.java
+++ b/vespajlib/src/main/java/com/yahoo/concurrent/SystemTimer.java
@@ -16,7 +16,7 @@ public enum SystemTimer implements Timer {
private volatile long millis;
- private static int detectHz() {
+ public static int detectHz() {
Logger log = Logger.getLogger(SystemTimer.class.getName());
String hzEnv = System.getenv("VESPA_TIMER_HZ");
int hz = 1000;