summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java8
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ClusterResourceLimits.java25
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ClusterResourceLimitsTest.java44
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentSchemaClusterTest.java17
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/FleetControllerClusterTest.java20
7 files changed, 26 insertions, 99 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
index f76cb6e43cc..c9ddcdf38eb 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
@@ -51,7 +51,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
private Quota quota = Quota.unlimited();
private boolean useAsyncMessageHandlingOnSchedule = false;
private double feedConcurrency = 0.5;
- private boolean enableFeedBlockInDistributor = true;
private int maxActivationInhibitedOutOfSyncGroups = 0;
private List<TenantSecretStore> tenantSecretStores = Collections.emptyList();
private String jvmOmitStackTraceInFastThrowOption;
@@ -106,7 +105,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public Quota quota() { return quota; }
@Override public boolean useAsyncMessageHandlingOnSchedule() { return useAsyncMessageHandlingOnSchedule; }
@Override public double feedConcurrency() { return feedConcurrency; }
- @Override public boolean enableFeedBlockInDistributor() { return enableFeedBlockInDistributor; }
@Override public int maxActivationInhibitedOutOfSyncGroups() { return maxActivationInhibitedOutOfSyncGroups; }
@Override public List<TenantSecretStore> tenantSecretStores() { return tenantSecretStores; }
@Override public String jvmOmitStackTraceInFastThrowOption(ClusterSpec.Type type) { return jvmOmitStackTraceInFastThrowOption; }
@@ -252,11 +250,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
return this;
}
- public TestProperties enableFeedBlockInDistributor(boolean enabled) {
- enableFeedBlockInDistributor = enabled;
- return this;
- }
-
public TestProperties maxActivationInhibitedOutOfSyncGroups(int nGroups) {
maxActivationInhibitedOutOfSyncGroups = nGroups;
return this;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java
index 25e00dc05dd..f0b32f9140d 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java
@@ -41,7 +41,6 @@ public class ClusterControllerConfig extends AbstractConfigProducer<ClusterContr
minNodeRatioPerGroup = clusterTuning.childAsDouble("min-node-ratio-per-group");
bucketSplittingMinimumBits = clusterTuning.childAsInteger("bucket-splitting.minimum-bits");
}
- boolean enableClusterFeedBlock = deployState.getProperties().featureFlags().enableFeedBlockInDistributor();
if (tuning != null) {
return new ClusterControllerConfig(ancestor, clusterName,
@@ -53,14 +52,13 @@ public class ClusterControllerConfig extends AbstractConfigProducer<ClusterContr
tuning.childAsDouble("min-storage-up-ratio"),
bucketSplittingMinimumBits,
minNodeRatioPerGroup,
- enableClusterFeedBlock,
resourceLimits);
} else {
return new ClusterControllerConfig(ancestor, clusterName,
null, null, null, null, null, null,
bucketSplittingMinimumBits,
minNodeRatioPerGroup,
- enableClusterFeedBlock, resourceLimits);
+ resourceLimits);
}
}
}
@@ -74,7 +72,6 @@ public class ClusterControllerConfig extends AbstractConfigProducer<ClusterContr
private final Double minStorageUpRatio;
private final Integer minSplitBits;
private final Double minNodeRatioPerGroup;
- private final boolean enableClusterFeedBlock;
private final ResourceLimits resourceLimits;
// TODO refactor; too many args
@@ -88,7 +85,6 @@ public class ClusterControllerConfig extends AbstractConfigProducer<ClusterContr
Double minStorageUpRatio,
Integer minSplitBits,
Double minNodeRatioPerGroup,
- boolean enableClusterFeedBlock,
ResourceLimits resourceLimits) {
super(parent, "fleetcontroller");
@@ -101,7 +97,6 @@ public class ClusterControllerConfig extends AbstractConfigProducer<ClusterContr
this.minStorageUpRatio = minStorageUpRatio;
this.minSplitBits = minSplitBits;
this.minNodeRatioPerGroup = minNodeRatioPerGroup;
- this.enableClusterFeedBlock = enableClusterFeedBlock;
this.resourceLimits = resourceLimits;
}
@@ -144,7 +139,6 @@ public class ClusterControllerConfig extends AbstractConfigProducer<ClusterContr
if (minNodeRatioPerGroup != null) {
builder.min_node_ratio_per_group(minNodeRatioPerGroup);
}
- builder.enable_cluster_feed_block(enableClusterFeedBlock);
resourceLimits.getConfig(builder);
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterResourceLimits.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterResourceLimits.java
index 0a08f81ffca..80dd17213f3 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterResourceLimits.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterResourceLimits.java
@@ -34,7 +34,6 @@ public class ClusterResourceLimits {
public static class Builder {
- private final boolean enableFeedBlockInDistributor;
private final boolean hostedVespa;
private final double resourceLimitDisk;
private final double resourceLimitMemory;
@@ -42,11 +41,9 @@ public class ClusterResourceLimits {
private ResourceLimits.Builder ctrlBuilder = new ResourceLimits.Builder();
private ResourceLimits.Builder nodeBuilder = new ResourceLimits.Builder();
- public Builder(boolean enableFeedBlockInDistributor,
- boolean hostedVespa,
+ public Builder(boolean hostedVespa,
double resourceLimitDisk,
double resourceLimitMemory) {
- this.enableFeedBlockInDistributor = enableFeedBlockInDistributor;
this.hostedVespa = hostedVespa;
this.resourceLimitDisk = resourceLimitDisk;
this.resourceLimitMemory = resourceLimitMemory;
@@ -81,17 +78,15 @@ public class ClusterResourceLimits {
}
private void deriveLimits() {
- if (enableFeedBlockInDistributor) {
- // This also ensures that content nodes limits are derived according to the formula in calcContentNodeLimit().
- considerSettingDefaultClusterControllerLimit(ctrlBuilder.getDiskLimit(),
- nodeBuilder.getDiskLimit(),
- ctrlBuilder::setDiskLimit,
- resourceLimitDisk);
- considerSettingDefaultClusterControllerLimit(ctrlBuilder.getMemoryLimit(),
- nodeBuilder.getMemoryLimit(),
- ctrlBuilder::setMemoryLimit,
- resourceLimitMemory);
- }
+ // This also ensures that content nodes limits are derived according to the formula in calcContentNodeLimit().
+ considerSettingDefaultClusterControllerLimit(ctrlBuilder.getDiskLimit(),
+ nodeBuilder.getDiskLimit(),
+ ctrlBuilder::setDiskLimit,
+ resourceLimitDisk);
+ considerSettingDefaultClusterControllerLimit(ctrlBuilder.getMemoryLimit(),
+ nodeBuilder.getMemoryLimit(),
+ ctrlBuilder::setMemoryLimit,
+ resourceLimitMemory);
deriveClusterControllerLimit(ctrlBuilder.getDiskLimit(), nodeBuilder.getDiskLimit(), ctrlBuilder::setDiskLimit);
deriveClusterControllerLimit(ctrlBuilder.getMemoryLimit(), nodeBuilder.getMemoryLimit(), ctrlBuilder::setMemoryLimit);
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 eda70ffb2bc..0d8f7148758 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
@@ -120,9 +120,7 @@ public class ContentCluster extends AbstractConfigProducer<AbstractConfigProduce
ContentCluster c = new ContentCluster(context.getParentProducer(), getClusterId(contentElement), documentDefinitions,
globallyDistributedDocuments, routingSelection,
deployState.zone(), deployState.isHosted());
- boolean enableFeedBlockInDistributor = deployState.getProperties().featureFlags().enableFeedBlockInDistributor();
- var resourceLimits = new ClusterResourceLimits.Builder(enableFeedBlockInDistributor,
- stateIsHosted(deployState),
+ var resourceLimits = new ClusterResourceLimits.Builder(stateIsHosted(deployState),
deployState.featureFlags().resourceLimitDisk(),
deployState.featureFlags().resourceLimitMemory())
.build(contentElement);
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterResourceLimitsTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterResourceLimitsTest.java
index 8cc7805fe3e..86847dae11f 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterResourceLimitsTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterResourceLimitsTest.java
@@ -21,7 +21,6 @@ import static org.junit.Assert.fail;
public class ClusterResourceLimitsTest {
private static class Fixture {
- private final boolean enableFeedBlockInDistributor;
private final boolean hostedVespa;
private final ResourceLimits.Builder ctrlBuilder = new ResourceLimits.Builder();
private final ResourceLimits.Builder nodeBuilder = new ResourceLimits.Builder();
@@ -30,12 +29,7 @@ public class ClusterResourceLimitsTest {
this(false);
}
- public Fixture(boolean enableFeedBlockInDistributor) {
- this(enableFeedBlockInDistributor, false);
- }
-
- public Fixture(boolean enableFeedBlockInDistributor, boolean hostedVespa) {
- this.enableFeedBlockInDistributor = enableFeedBlockInDistributor;
+ public Fixture(boolean hostedVespa) {
this.hostedVespa = hostedVespa;
}
@@ -57,8 +51,7 @@ public class ClusterResourceLimitsTest {
}
public ClusterResourceLimits build() {
ModelContext.FeatureFlags featureFlags = new TestProperties();
- var builder = new ClusterResourceLimits.Builder(enableFeedBlockInDistributor,
- hostedVespa,
+ var builder = new ClusterResourceLimits.Builder(hostedVespa,
featureFlags.resourceLimitDisk(),
featureFlags.resourceLimitMemory());
builder.setClusterControllerBuilder(ctrlBuilder);
@@ -71,50 +64,32 @@ public class ClusterResourceLimitsTest {
public void content_node_limits_are_derived_from_cluster_controller_limits_if_not_set() {
assertLimits(0.4, 0.7, 0.7, 0.85,
new Fixture().ctrlDisk(0.4).ctrlMemory(0.7));
- assertLimits(0.4, null, 0.7, null,
- new Fixture().ctrlDisk(0.4));
- assertLimits(null, 0.7, null, 0.85,
- new Fixture().ctrlMemory(0.7));
-
-
- assertLimits(0.4, 0.7, 0.7, 0.85,
- new Fixture(true).ctrlDisk(0.4).ctrlMemory(0.7));
assertLimits(0.4, 0.8, 0.7, 0.9,
- new Fixture(true).ctrlDisk(0.4));
+ new Fixture().ctrlDisk(0.4));
assertLimits(0.8, 0.7, 0.9, 0.85,
- new Fixture(true).ctrlMemory(0.7));
+ new Fixture().ctrlMemory(0.7));
}
@Test
public void content_node_limits_can_be_set_explicit() {
assertLimits(0.4, 0.7, 0.9, 0.95,
new Fixture().ctrlDisk(0.4).ctrlMemory(0.7).nodeDisk(0.9).nodeMemory(0.95));
- assertLimits(0.4, null, 0.95, null,
- new Fixture().ctrlDisk(0.4).nodeDisk(0.95));
- assertLimits(null, 0.7, null, 0.95,
- new Fixture().ctrlMemory(0.7).nodeMemory(0.95));
-
- assertLimits(0.4, 0.7, 0.9, 0.95,
- new Fixture(true).ctrlDisk(0.4).ctrlMemory(0.7).nodeDisk(0.9).nodeMemory(0.95));
assertLimits(0.4, 0.8, 0.95, 0.9,
- new Fixture(true).ctrlDisk(0.4).nodeDisk(0.95));
+ new Fixture().ctrlDisk(0.4).nodeDisk(0.95));
assertLimits(0.8, 0.7, 0.9, 0.95,
- new Fixture(true).ctrlMemory(0.7).nodeMemory(0.95));
+ new Fixture().ctrlMemory(0.7).nodeMemory(0.95));
}
@Test
public void cluster_controller_limits_are_equal_to_content_node_limits_minus_one_percent_if_not_set() {
assertLimits(0.89, 0.94, 0.9, 0.95,
new Fixture().nodeDisk(0.9).nodeMemory(0.95));
- assertLimits(0.89, null, 0.9, null,
+ assertLimits(0.89, 0.8, 0.9, 0.9,
new Fixture().nodeDisk(0.9));
- assertLimits(null, 0.94, null, 0.95,
+ assertLimits(0.8, 0.94, 0.9, 0.95,
new Fixture().nodeMemory(0.95));
- assertLimits(null, 0.0, null, 0.005,
+ assertLimits(0.8, 0.0, 0.9, 0.005,
new Fixture().nodeMemory(0.005));
-
- assertLimits(0.89, 0.94, 0.9, 0.95,
- new Fixture(true).nodeDisk(0.9).nodeMemory(0.95));
}
@Test
@@ -193,7 +168,6 @@ public class ClusterResourceLimitsTest {
"</cluster>");
ClusterResourceLimits.Builder builder = new ClusterResourceLimits.Builder(true,
- true,
featureFlags.resourceLimitDisk(),
featureFlags.resourceLimitMemory());
return builder.build(new ModelElement((limitsInXml ? clusterXml : noLimitsXml).getDocumentElement()));
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSchemaClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSchemaClusterTest.java
index 68e722f45d3..fac6eeb3cc3 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSchemaClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSchemaClusterTest.java
@@ -77,12 +77,6 @@ public class ContentSchemaClusterTest {
return new ProtonConfig(builder);
}
- private static ContentCluster createClusterWithFeatureFlag(String clusterXml, boolean enableFeedBlockInDistributor) throws Exception {
- var deployStateBuilder = new DeployState.Builder().properties(
- new TestProperties().enableFeedBlockInDistributor(enableFeedBlockInDistributor));
- return createCluster(clusterXml, deployStateBuilder);
- }
-
private static void assertProtonResourceLimits(double expDiskLimit, double expMemoryLimit, String clusterXml) throws Exception {
assertProtonResourceLimits(expDiskLimit, expMemoryLimit, createCluster(clusterXml));
}
@@ -142,15 +136,8 @@ public class ContentSchemaClusterTest {
}
@Test
- public void default_resource_limits_when_feed_block_is_disabled_in_distributor() throws Exception {
- var cluster = createClusterWithFeatureFlag(new ContentClusterBuilder().getXml(), false);
- assertProtonResourceLimits(0.8, 0.8, cluster);
- assertClusterControllerResourceLimits(0.8, 0.8, cluster);
- }
-
- @Test
- public void default_resource_limits_when_feed_block_is_enabled_in_distributor() throws Exception {
- var cluster = createClusterWithFeatureFlag(new ContentClusterBuilder().getXml(), true);
+ public void default_resource_limits_with_feed_block_in_distributor() throws Exception {
+ var cluster = createCluster(new ContentClusterBuilder().getXml());
assertProtonResourceLimits(0.9, 0.9, cluster);
assertClusterControllerResourceLimits(0.8, 0.8, cluster);
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/FleetControllerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/FleetControllerClusterTest.java
index b27a8a192bc..e074d493e68 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/FleetControllerClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/FleetControllerClusterTest.java
@@ -19,14 +19,12 @@ public class FleetControllerClusterTest {
private ClusterControllerConfig parse(String xml, TestProperties props) {
Document doc = XML.getDocument(xml);
var deployState = new DeployState.Builder().properties(props).build();
- boolean enableFeedBlockInDistributor = deployState.getProperties().featureFlags().enableFeedBlockInDistributor();
MockRoot root = new MockRoot("", deployState);
var clusterElement = new ModelElement(doc.getDocumentElement());
ModelContext.FeatureFlags featureFlags = new TestProperties();
return new ClusterControllerConfig.Builder("storage",
clusterElement,
- new ClusterResourceLimits.Builder(enableFeedBlockInDistributor,
- false,
+ new ClusterResourceLimits.Builder(false,
featureFlags.resourceLimitDisk(),
featureFlags.resourceLimitMemory())
.build(clusterElement).getClusterControllerLimits())
@@ -34,7 +32,7 @@ public class FleetControllerClusterTest {
}
private ClusterControllerConfig parse(String xml) {
- return parse(xml, new TestProperties().enableFeedBlockInDistributor(true));
+ return parse(xml, new TestProperties());
}
@Test
@@ -104,7 +102,6 @@ public class FleetControllerClusterTest {
assertEquals(0.0, config.min_node_ratio_per_group(), 0.01);
}
-
@Test
public void default_cluster_feed_block_limits_are_set() {
assertLimits(0.8, 0.8, getConfigForBasicCluster());
@@ -143,17 +140,6 @@ public class FleetControllerClusterTest {
}
@Test
- public void feature_flag_controls_enable_cluster_feed_block() {
- verifyThatFeatureFlagControlsEnableClusterFeedBlock(true);
- verifyThatFeatureFlagControlsEnableClusterFeedBlock(false);
- }
-
- private void verifyThatFeatureFlagControlsEnableClusterFeedBlock(boolean flag) {
- var config = getConfigForBasicCluster(new TestProperties().enableFeedBlockInDistributor(flag));
- assertEquals(flag, config.enable_cluster_feed_block());
- }
-
- @Test
public void feature_flag_controls_min_node_ratio_per_group() {
verifyFeatureFlagControlsMinNodeRatioPerGroup(0.0, new TestProperties());
verifyFeatureFlagControlsMinNodeRatioPerGroup(0.3,
@@ -175,6 +161,6 @@ public class FleetControllerClusterTest {
}
private FleetcontrollerConfig getConfigForBasicCluster() {
- return getConfigForBasicCluster(new TestProperties().enableFeedBlockInDistributor(true));
+ return getConfigForBasicCluster(new TestProperties());
}
}