diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2020-12-09 11:11:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 11:11:51 +0100 |
commit | 6545c425f8b996522ba8f0a49879019edfb67909 (patch) | |
tree | b927a4278d6380672dcc0baba7e7e2e5d5f264bc | |
parent | 81175bb9b08ae7e4ec9cff26ba9f2bd8cd3b86fa (diff) | |
parent | 8866bdc9f525396e0d06f6c18acd12716c31990e (diff) |
Merge pull request #15747 from vespa-engine/jonmv/no-periodic-reindexing-triggering-in-config-server
Do not trigger reindexing periodically from config server
2 files changed, 6 insertions, 18 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainer.java index cd3e1d97b28..22eb95261bd 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainer.java @@ -35,8 +35,6 @@ public class ReindexingMaintainer extends ConfigServerMaintainer { /** Timeout per service when getting config generations. */ private static final Duration timeout = Duration.ofSeconds(10); - static final Duration reindexingInterval = Duration.ofDays(28); - private final ConfigConvergenceChecker convergence; private final Clock clock; @@ -89,11 +87,6 @@ public class ReindexingMaintainer extends ConfigServerMaintainer { reindexing = reindexing.withReady(cluster.getKey(), pending.getKey(), now) .withoutPending(cluster.getKey(), pending.getKey()); - // Additionally, reindex the whole application with a fixed interval. - Instant nextPeriodicReindexing = reindexing.common().ready(); - while ((nextPeriodicReindexing = nextPeriodicReindexing.plus(reindexingInterval)).isBefore(now)) - reindexing = reindexing.withReady(nextPeriodicReindexing); // Deterministic timestamp. - return reindexing; } diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainerTest.java index b6177a11da8..d75b91f45e3 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/maintenance/ReindexingMaintainerTest.java @@ -30,20 +30,15 @@ public class ReindexingMaintainerTest { withNewReady(reindexing, () -> -1L, Instant.EPOCH)); // Status for (one, a) changes, but not (two, b). - - assertEquals(reindexing.withReady("one", "a", Instant.EPOCH) - .withoutPending("one", "a"), - withNewReady(reindexing, () -> 19L, Instant.EPOCH)); - - Instant later = Instant.EPOCH.plus(ReindexingMaintainer.reindexingInterval.multipliedBy(3)); + Instant later = Instant.ofEpochMilli(3 << 10); assertEquals(reindexing.withoutPending("one", "a") // Converged, no longer pending. - .withReady(later), // Had EPOCH as previous, so is updated, overwriting all more specific status. - withNewReady(reindexing, () -> 19L, later.plusMillis(1))); + .withReady("one", "a", later), // Converged, now ready. + withNewReady(reindexing, () -> 19L, later)); assertEquals(reindexing.withoutPending("one", "a") // Converged, no longer pending. - .withoutPending("two", "b") // Converged, no LOnger pending. - .withReady(later), // Had EPOCH as previous, so is updated, overwriting all more specific status. - withNewReady(reindexing, () -> 20L, later.plusMillis(1))); + .withoutPending("two", "b") // Converged, no Longer pending. + .withReady(later), // Outsider calls withReady(later), overriding more specific status. + withNewReady(reindexing, () -> 20L, later).withReady(later)); // Verify generation supplier isn't called when no pending document types. withNewReady(reindexing.withoutPending("one", "a").withoutPending("two", "b"), |