aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-04-27 09:09:21 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-04-27 09:09:21 +0200
commit10473dd015629fbf17512c982bbe57651ce54413 (patch)
treefc0546c01c3b5af1270152bf4d3136dee6d65348 /config-model/src/main/java/com/yahoo
parent58daaccf83103d8b082c8ca724dc5c78f5d84392 (diff)
Derive searchable-copies automatically with groups > 2
Diffstat (limited to 'config-model/src/main/java/com/yahoo')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/cluster/RedundancyBuilder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/RedundancyBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/RedundancyBuilder.java
index 464937156a2..e7bafdf52e4 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/RedundancyBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/RedundancyBuilder.java
@@ -62,7 +62,7 @@ public class RedundancyBuilder {
if (globalMinRedundancy != null && ( finalRedundancy == null || finalRedundancy < globalMinRedundancy))
initialRedundancy = finalRedundancy = globalMinRedundancy;
if (readyCopies == null)
- readyCopies = finalRedundancy > 1 ? 2 : 1;
+ readyCopies = finalRedundancy > 1 ? Math.max(subGroups, 2) : 1;
subGroups = Math.max(1, subGroups);
IndexedHierarchicDistributionValidator.validateThatLeafGroupsCountIsAFactorOfRedundancy(finalRedundancy, subGroups);
IndexedHierarchicDistributionValidator.validateThatReadyCopiesIsCompatibleWithRedundancy(finalRedundancy, readyCopies, subGroups);