diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-10-06 23:30:20 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-10-06 23:30:20 +0200 |
commit | c63c5b593f0844173917ba31b99e4148c2706fd5 (patch) | |
tree | 64d2caca445ceffd5c76f8f2b1ce4df24d811a99 /config-model | |
parent | 54fae00cefe5e3483461a472d49ee4310b023722 (diff) |
No need for feature flag for max-merge-queue-size
Diffstat (limited to 'config-model')
6 files changed, 29 insertions, 42 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 fa14bdf9b5b..0c7785aabd4 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 @@ -55,7 +55,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private int maxActivationInhibitedOutOfSyncGroups = 0; private List<TenantSecretStore> tenantSecretStores = Collections.emptyList(); private String jvmOmitStackTraceInFastThrowOption; - private int maxMergeQueueSize = 100; private boolean allowDisableMtls = true; private List<X509Certificate> operatorCertificates = Collections.emptyList(); private double resourceLimitDisk = 0.75; @@ -110,7 +109,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public String jvmOmitStackTraceInFastThrowOption(ClusterSpec.Type type) { return jvmOmitStackTraceInFastThrowOption; } @Override public boolean allowDisableMtls() { return allowDisableMtls; } @Override public List<X509Certificate> operatorCertificates() { return operatorCertificates; } - @Override public int maxMergeQueueSize() { return maxMergeQueueSize; } @Override public double resourceLimitDisk() { return resourceLimitDisk; } @Override public double resourceLimitMemory() { return resourceLimitMemory; } @Override public double minNodeRatioPerGroup() { return minNodeRatioPerGroup; } @@ -204,11 +202,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea return this; } - public TestProperties setMaxMergeQueueSize(int maxMergeQueueSize) { - this.maxMergeQueueSize = maxMergeQueueSize; - return this; - } - public TestProperties setDefaultTermwiseLimit(double limit) { defaultTermwiseLimit = limit; return this; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java index 4c74282c061..06453bffaaf 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.builder.xml.dom; -import com.yahoo.config.application.api.DeployLogger; import com.yahoo.config.model.ConfigModelContext.ApplicationType; import com.yahoo.config.model.api.ConfigServerSpec; import com.yahoo.config.model.deploy.DeployState; 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 555b38e20ba..4298488b1fd 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 @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.content.storagecluster; -import com.yahoo.config.model.api.ModelContext; import com.yahoo.vespa.config.content.core.StorServerConfig; import com.yahoo.vespa.model.builder.xml.dom.ModelElement; import com.yahoo.vespa.model.content.cluster.ContentCluster; @@ -11,10 +10,10 @@ import com.yahoo.vespa.model.content.cluster.ContentCluster; */ public class StorServerProducer implements StorServerConfig.Producer { public static class Builder { - StorServerProducer build(ModelContext.Properties properties, ModelElement element) { + StorServerProducer build(ModelElement element) { ModelElement tuning = element.child("tuning"); - StorServerProducer producer = new StorServerProducer(ContentCluster.getClusterId(element), properties.featureFlags()); + StorServerProducer producer = new StorServerProducer(ContentCluster.getClusterId(element)); if (tuning == null) return producer; ModelElement merges = tuning.child("merges"); @@ -43,9 +42,8 @@ public class StorServerProducer implements StorServerConfig.Producer { return this; } - StorServerProducer(String clusterName, ModelContext.FeatureFlags featureFlags) { + StorServerProducer(String clusterName) { this.clusterName = clusterName; - queueSize = featureFlags.maxMergeQueueSize(); } @Override diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java index da82a69842a..9b59f6db742 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java @@ -38,7 +38,7 @@ public class StorageCluster extends AbstractConfigProducer<StorageNode> ContentCluster.getClusterId(clusterElem), new FileStorProducer.Builder().build(deployState.getProperties(), cluster, clusterElem), new IntegrityCheckerProducer.Builder().build(cluster, clusterElem), - new StorServerProducer.Builder().build(deployState.getProperties(), clusterElem), + new StorServerProducer.Builder().build(clusterElem), new StorVisitorProducer.Builder().build(clusterElem), new PersistenceProducer.Builder().build(clusterElem)); } 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 8f9941820d6..f3a59733ece 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 @@ -120,9 +120,7 @@ public class StorageClusterTest { parse(cluster("foofighters", joinLines( "<tuning>", " <merges max-per-node=\"1K\" max-queue-size=\"10K\"/>", - "</tuning>")), - new TestProperties().setMaxMergeQueueSize(1919) - ).getConfig(builder); + "</tuning>"))).getConfig(builder); StorServerConfig config = new StorServerConfig(builder); assertEquals(1024, config.max_merges_per_node()); @@ -174,9 +172,9 @@ public class StorageClusterTest { @Test void testMergeFeatureFlags() { - var config = configFromProperties(new TestProperties().setMaxMergeQueueSize(1919)); + var config = configFromProperties(new TestProperties()); assertEquals(16, config.max_merges_per_node()); - assertEquals(1919, config.max_merge_queue_size()); + assertEquals(100, config.max_merge_queue_size()); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java index 8830e5484b3..ee885cdf43e 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java @@ -19,7 +19,6 @@ import com.yahoo.vespa.model.content.utils.DocType; import com.yahoo.vespa.model.search.IndexedSearchCluster; import org.junit.jupiter.api.Test; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -55,7 +54,7 @@ public class DocumentDatabaseTestCase { @Test void requireThatMixedModeConcurrencyIsReflectedCorrectlyForDefault() { - verifyConcurrency(Arrays.asList(DocType.create("a", "index"), DocType.create("b", "streaming")), "", 1.0); + verifyConcurrency(List.of(DocType.create("a", "index"), DocType.create("b", "streaming")), "", 1.0); } @Test @@ -63,7 +62,7 @@ public class DocumentDatabaseTestCase { String feedTuning = "<feeding>" + " <concurrency>0.7</concurrency>" + "</feeding>\n"; - verifyConcurrency(Arrays.asList(DocType.create("a", "index"), DocType.create("b", "streaming")), feedTuning, 0.7); + verifyConcurrency(List.of(DocType.create("a", "index"), DocType.create("b", "streaming")), feedTuning, 0.7); } @Test @@ -77,11 +76,11 @@ public class DocumentDatabaseTestCase { } private void verifyConcurrency(String mode, String xmlTuning, double expectedConcurrency, double featureFlagConcurrency) { - verifyConcurrency(Arrays.asList(DocType.create("a", mode)), xmlTuning, expectedConcurrency, featureFlagConcurrency); + verifyConcurrency(List.of(DocType.create("a", mode)), xmlTuning, expectedConcurrency, featureFlagConcurrency); } private void verifyConcurrency(String mode, String xmlTuning, double expectedConcurrency) { - verifyConcurrency(Arrays.asList(DocType.create("a", mode)), xmlTuning, expectedConcurrency, null); + verifyConcurrency(List.of(DocType.create("a", mode)), xmlTuning, expectedConcurrency, null); } private void verifyConcurrency(List<DocType> nameAndModes, String xmlTuning, double expectedConcurrency) { @@ -114,14 +113,14 @@ public class DocumentDatabaseTestCase { @Test void requireFeedNicenessIsReflected() { - verifyFeedNiceness(Arrays.asList(DocType.create("a", "index")), 0.0, null); - verifyFeedNiceness(Arrays.asList(DocType.create("a", "index")), 0.32, 0.32); + verifyFeedNiceness(List.of(DocType.create("a", "index")), 0.0, null); + verifyFeedNiceness(List.of(DocType.create("a", "index")), 0.32, 0.32); } @Test void requireThatModeIsSet() { var tester = new SchemaTester(); - VespaModel model = tester.createModel(Arrays.asList(DocType.create("a", "index"), + VespaModel model = tester.createModel(List.of(DocType.create("a", "index"), DocType.create("b", "streaming"), DocType.create("c", "store-only")), ""); ContentSearchCluster contentSearchCluster = model.getContentClusters().get("test").getSearch(); @@ -150,8 +149,8 @@ public class DocumentDatabaseTestCase { @Test void requireThatMixedModeInitialDocumentCountIsReflectedCorrectlyForDefault() { final long DEFAULT = 1024L; - verifyInitialDocumentCount(Arrays.asList(DocType.create("a", "index"), DocType.create("b", "streaming")), - "", Arrays.asList(DEFAULT, DEFAULT)); + verifyInitialDocumentCount(List.of(DocType.create("a", "index"), DocType.create("b", "streaming")), + "", List.of(DEFAULT, DEFAULT)); } @Test @@ -160,8 +159,8 @@ public class DocumentDatabaseTestCase { String feedTuning = "<resizing>" + " <initialdocumentcount>1000000000</initialdocumentcount>" + "</resizing>\n"; - verifyInitialDocumentCount(Arrays.asList(DocType.create("a", "index"), DocType.create("b", "streaming")), - feedTuning, Arrays.asList(INITIAL, INITIAL)); + verifyInitialDocumentCount(List.of(DocType.create("a", "index"), DocType.create("b", "streaming")), + feedTuning, List.of(INITIAL, INITIAL)); } private void assertDocTypeConfig(VespaModel model, String configId, String indexField, String attributeField) { @@ -345,30 +344,30 @@ public class DocumentDatabaseTestCase { @Test void testThatAttributesMaxUnCommittedMemoryIsControlledByFeatureFlag() { - assertAttributesConfigIndependentOfMode("index", Arrays.asList("type1"), - Arrays.asList("test/search/cluster.test/type1"), - ImmutableMap.of("type1", Arrays.asList("f2", "f2_nfa")), + assertAttributesConfigIndependentOfMode("index", List.of("type1"), + List.of("test/search/cluster.test/type1"), + ImmutableMap.of("type1", List.of("f2", "f2_nfa")), new DeployState.Builder().properties(new TestProperties().maxUnCommittedMemory(193452)), 193452); } @Test void testThatAttributesConfigIsProducedForIndexed() { - assertAttributesConfigIndependentOfMode("index", Arrays.asList("type1"), - Arrays.asList("test/search/cluster.test/type1"), - ImmutableMap.of("type1", Arrays.asList("f2", "f2_nfa"))); + assertAttributesConfigIndependentOfMode("index", List.of("type1"), + List.of("test/search/cluster.test/type1"), + ImmutableMap.of("type1", List.of("f2", "f2_nfa"))); } @Test void testThatAttributesConfigIsProducedForStreamingForFastAccessFields() { - assertAttributesConfigIndependentOfMode("streaming", Arrays.asList("type1"), - Arrays.asList("test/search/type1"), - ImmutableMap.of("type1", Arrays.asList("f2"))); + assertAttributesConfigIndependentOfMode("streaming", List.of("type1"), + List.of("test/search/type1"), + ImmutableMap.of("type1", List.of("f2"))); } @Test void testThatAttributesConfigIsNotProducedForStoreOnlyEvenForFastAccessFields() { - assertAttributesConfigIndependentOfMode("store-only", Arrays.asList("type1"), - Arrays.asList("test/search"), Collections.emptyMap()); + assertAttributesConfigIndependentOfMode("store-only", List.of("type1"), + List.of("test/search"), Collections.emptyMap()); } } |