aboutsummaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-03-04 09:00:47 +0100
committerJon Bratseth <bratseth@gmail.com>2021-03-04 09:00:47 +0100
commit0839a464295f0e05af04a5ca0f5fafac0760bad6 (patch)
tree2498c6dc2273c373e9adf7e4183e83b6c6586a96 /vespajlib
parentd94c73ef32a5d21c064c62f81b796f3b376676e2 (diff)
Let the system settle before maintenance starts
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java b/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java
index e8336e54120..edc639840b0 100644
--- a/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java
+++ b/vespajlib/src/main/java/com/yahoo/concurrent/maintenance/Maintainer.java
@@ -43,7 +43,8 @@ public abstract class Maintainer implements Runnable {
this.ignoreCollision = ignoreCollision;
Objects.requireNonNull(startedAt);
Objects.requireNonNull(clusterHostnames);
- Duration initialDelay = staggeredDelay(interval, startedAt, HostName.getLocalhost(), clusterHostnames);
+ Duration initialDelay = staggeredDelay(interval, startedAt, HostName.getLocalhost(), clusterHostnames)
+ .plus(Duration.ofSeconds(30));
service = new ScheduledThreadPoolExecutor(1, r -> new Thread(r, name() + "-worker"));
service.scheduleAtFixedRate(this, initialDelay.toMillis(), interval.toMillis(), TimeUnit.MILLISECONDS);
jobControl.started(name(), this);