summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2020-02-11 08:30:56 +0100
committerGitHub <noreply@github.com>2020-02-11 08:30:56 +0100
commita79e1ca39d6349e583b266e5b11237efe2e7f5c5 (patch)
treef1e88a3e5b650f243414d6101d988b72e386358e
parent36aa7473681171f2a1b882a860b79051bb784e47 (diff)
parent413452ee7acb2d404d2cabd9e73d1c1846b68ee5 (diff)
Merge pull request #12141 from vespa-engine/balder/keep-silent-until-you-know-what-you-are-talking-about
Keep silent until you know what you are talking about.
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java8
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java1
2 files changed, 9 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java b/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java
index 91bd5c6da11..24ecea9c3ee 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java
@@ -132,6 +132,14 @@ public class Dispatcher extends AbstractComponent {
Thread.sleep(1);
}
} catch (InterruptedException e) {}
+
+ /*
+ * No we have information from all nodes and a ping iteration has completed.
+ * Instead of waiting until next ping interval to update coverage and group state,
+ * we should compute the state ourselves, so that when the dispatcher is ready the state
+ * of its groups are also known.
+ */
+ searchCluster.pingIterationCompleted();
}
/** Returns the search cluster this dispatches to */
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
index d44ade66967..1da13f6c082 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
@@ -378,6 +378,7 @@ public class SearchCluster implements NodeManager<Node> {
}
private void trackGroupCoverageChanges(int index, Group group, boolean fullCoverage, long averageDocuments) {
+ if ( ! hasInformationAboutAllNodes()) return; // Be silent until we know what we are talking about.
boolean changed = group.isFullCoverageStatusChanged(fullCoverage);
if (changed || (!fullCoverage && System.currentTimeMillis() > nextLogTime)) {
nextLogTime = System.currentTimeMillis() + 30 * 1000;