summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2021-03-19 15:52:07 +0100
committerGitHub <noreply@github.com>2021-03-19 15:52:07 +0100
commitc46bc91aaa56b24d411eb5b34cade6709cf70203 (patch)
tree50c61d0171f425e3cf3556a5c54deedf317a3850
parent0960c9e8bcd7e7b336939db1f5ec1a2657175622 (diff)
Revert "Don't write to standard err"
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java
index 2bd343fc230..909a29fd0a3 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java
@@ -97,10 +97,10 @@ public class IndexedHierarchicDistributionValidator {
}
if (totalReadyCopies % groupCount != 0) {
throw new IllegalArgumentException(getErrorMsgPrefix(clusterName) + "Expected equal amount of ready copies per group, but " +
- totalReadyCopies + " ready copies is specified with " + groupCount + " groups");
+ totalReadyCopies + " ready copies is specified with " + groupCount + " groups");
}
if (totalReadyCopies == 0) {
- throw new IllegalArgumentException(getErrorMsgPrefix(clusterName) + "Warning. No ready copies configured. At least one is recommended.");
+ System.err.println(getErrorMsgPrefix(clusterName) + "Warning. No ready copies configured. At least one is recommended.");
}
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java
index 3be592e54e7..80ab6745b79 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java
@@ -254,4 +254,10 @@ public class IndexedHierarchicDistributionTest {
getTwoGroupsCluster(4, 2, "2|*");
}
+ @Test
+ public void allowNoReadyCopies() throws Exception {
+ // The active one should be indexed anyhow. Setting up no ready copies
+ getTwoGroupsCluster(4, 0, "2|*");
+ }
+
}