aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java7
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java
index dfdfa9303a7..2592beca6c6 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java
@@ -519,7 +519,7 @@ public class ContentCluster extends TreeConfigProducer<AnyConfigProducer> implem
* in config and not remove it again if they reduce the node count.
*/
public int distributionBits() {
- if (zone.environment() == Environment.prod && ! zone.equals(Zone.defaultZone())) {
+ if (zoneEnvImplies16DistributionBits() && ! zone.equals(Zone.defaultZone())) {
return 16;
}
else { // hosted test zone, or self-hosted system
@@ -529,6 +529,11 @@ public class ContentCluster extends TreeConfigProducer<AnyConfigProducer> implem
}
}
+ private boolean zoneEnvImplies16DistributionBits() {
+ // We want perf to behave like prod as much as possible.
+ return (zone.environment() == Environment.prod) || (zone.environment() == Environment.perf);
+ }
+
public boolean isHosted() {
return isHosted;
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java
index f9b1edf4f35..4ce7119f5f7 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java
@@ -629,6 +629,9 @@ public class ContentClusterTest extends ContentBaseTest {
ContentCluster prodWith16Bits = createWithZone(xml, new Zone(Environment.prod, RegionName.from("us-east-3")));
assertDistributionBitsInConfig(prodWith16Bits, 16);
+ ContentCluster perfWith16Bits = createWithZone(xml, new Zone(Environment.perf, RegionName.from("us-east-3")));
+ assertDistributionBitsInConfig(perfWith16Bits, 16);
+
ContentCluster stagingNot16Bits = createWithZone(xml, new Zone(Environment.staging, RegionName.from("us-east-3")));
assertDistributionBitsInConfig(stagingNot16Bits, 8);
}