diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-10-06 15:34:52 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-10-06 15:34:52 +0200 |
commit | 1adea3b6b05c4ca86e26648a24cfd0f57c486ae8 (patch) | |
tree | ff50328ad6efe1da14e7322f787cc4bdf70e7031 /config-model | |
parent | 2a3d18e48a54d38ee4ffe4c0c7e4390fb3f5db22 (diff) |
merge-throttling-policy has long been static.
Diffstat (limited to 'config-model')
3 files changed, 0 insertions, 32 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 ea5b62392cb..d6de407f1a6 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 @@ -67,7 +67,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private int maxUnCommittedMemory = 123456; private List<String> zoneDnsSuffixes = List.of(); private int maxCompactBuffers = 1; - private String mergeThrottlingPolicy = "STATIC"; private double persistenceThrottlingWsDecrementFactor = 1.2; private double persistenceThrottlingWsBackoff = 0.95; private int persistenceThrottlingWindowSize = -1; @@ -127,7 +126,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public int maxUnCommittedMemory() { return maxUnCommittedMemory; } @Override public List<String> zoneDnsSuffixes() { return zoneDnsSuffixes; } @Override public int maxCompactBuffers() { return maxCompactBuffers; } - @Override public String mergeThrottlingPolicy() { return mergeThrottlingPolicy; } @Override public double persistenceThrottlingWsDecrementFactor() { return persistenceThrottlingWsDecrementFactor; } @Override public double persistenceThrottlingWsBackoff() { return persistenceThrottlingWsBackoff; } @Override public int persistenceThrottlingWindowSize() { return persistenceThrottlingWindowSize; } @@ -327,11 +325,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea return this; } - public TestProperties setMergeThrottlingPolicy(String policy) { - this.mergeThrottlingPolicy = policy; - return this; - } - public TestProperties setPersistenceThrottlingWsDecrementFactor(double factor) { this.persistenceThrottlingWsDecrementFactor = factor; return this; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorServerProducer.java b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorServerProducer.java index e66f2c48f26..86785ea20d2 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorServerProducer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorServerProducer.java @@ -29,7 +29,6 @@ public class StorServerProducer implements StorServerConfig.Producer { private final String clusterName; private Integer maxMergesPerNode; private Integer queueSize; - private final StorServerConfig.Merge_throttling_policy.Type.Enum mergeThrottlingPolicyType; private StorServerProducer setMaxMergesPerNode(Integer value) { if (value != null) { @@ -44,19 +43,10 @@ public class StorServerProducer implements StorServerConfig.Producer { return this; } - private static StorServerConfig.Merge_throttling_policy.Type.Enum toThrottlePolicyType(String policyType) { - try { - return StorServerConfig.Merge_throttling_policy.Type.Enum.valueOf(policyType); - } catch (Throwable t) { - return StorServerConfig.Merge_throttling_policy.Type.STATIC; - } - } - StorServerProducer(String clusterName, ModelContext.FeatureFlags featureFlags) { this.clusterName = clusterName; maxMergesPerNode = featureFlags.maxConcurrentMergesPerNode(); queueSize = featureFlags.maxMergeQueueSize(); - mergeThrottlingPolicyType = toThrottlePolicyType(featureFlags.mergeThrottlingPolicy()); } @Override @@ -73,7 +63,5 @@ public class StorServerProducer implements StorServerConfig.Producer { if (queueSize != null) { builder.max_merge_queue_size(queueSize); } - // TODO set throttle policy params based on existing or separate flags - builder.merge_throttling_policy(new StorServerConfig.Merge_throttling_policy.Builder().type(mergeThrottlingPolicyType)); } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java index f7afcc281f9..bde3be562f7 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java @@ -186,19 +186,6 @@ public class StorageClusterTest { } @Test - void merge_throttling_policy_config_is_derived_from_flag() { - var config = configFromProperties(new TestProperties().setMergeThrottlingPolicy("STATIC")); - assertEquals(StorServerConfig.Merge_throttling_policy.Type.STATIC, config.merge_throttling_policy().type()); - - config = configFromProperties(new TestProperties().setMergeThrottlingPolicy("DYNAMIC")); - assertEquals(StorServerConfig.Merge_throttling_policy.Type.DYNAMIC, config.merge_throttling_policy().type()); - - // Invalid enum values fall back to the default - config = configFromProperties(new TestProperties().setMergeThrottlingPolicy("UKULELE")); - assertEquals(StorServerConfig.Merge_throttling_policy.Type.STATIC, config.merge_throttling_policy().type()); - } - - @Test void testVisitors() { StorVisitorConfig.Builder builder = new StorVisitorConfig.Builder(); parse(cluster("bees", |