diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-12-08 18:08:56 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-12-08 18:08:56 +0100 |
commit | fdae653c10446d998d128dfbe2f70bf548c53acc (patch) | |
tree | 8f3c6a9a72f95b1dd5a3b4ae556ede5e4c098889 | |
parent | 6ca5863b37cb94b1ebb223cbe3a44a4554f845eb (diff) |
Do not trigger reindexing periodically from config server
2 files changed, 6 insertions, 16 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..992df437af7 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 @@ -89,11 +89,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"), |