aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-12-03 14:03:25 +0100
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-12-03 17:11:36 +0100
commitfb21ab2649cd20e2361926404e1843c47c15d4fd (patch)
treef0bea441c78b8bd0390471fe8c57434df8effd89 /config-model
parent5832d0d6182f69bcd67403cb219420ddbe29487c (diff)
Move non-permanent feature flags to ModelContext.FeatureFlags
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java1
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java10
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java4
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/Distributor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/StorageNode.java5
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java12
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorServerProducer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java6
11 files changed, 24 insertions, 24 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 0e4d0db484e..02bc0c9ca84 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
@@ -26,6 +26,7 @@ import java.util.Set;
*
* @author hakonhall
*/
+@SuppressWarnings("deprecation")
public class TestProperties implements ModelContext.Properties, ModelContext.FeatureFlags {
private boolean multitenant = false;
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java
index 56a5d539906..c656a426b61 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java
@@ -191,7 +191,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
numThreadsPerSearch = rankProfile.getNumThreadsPerSearch();
minHitsPerThread = rankProfile.getMinHitsPerThread();
numSearchPartitions = rankProfile.getNumSearchPartitions();
- termwiseLimit = rankProfile.getTermwiseLimit().orElse(deployProperties.defaultTermwiseLimit());
+ termwiseLimit = rankProfile.getTermwiseLimit().orElse(deployProperties.featureFlags().defaultTermwiseLimit());
keepRankCount = rankProfile.getKeepRankCount();
rankScoreDropLimit = rankProfile.getRankScoreDropLimit();
ignoreDefaultRankFeatures = rankProfile.getIgnoreDefaultRankFeatures();
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
index 78f37275c30..7e6c6486b86 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
@@ -377,7 +377,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
}
EndpointCertificateSecrets endpointCertificateSecrets = deployState.endpointCertificateSecrets().get();
- boolean enforceHandshakeClientAuth = context.properties().useAccessControlTlsHandshakeClientAuth() &&
+ boolean enforceHandshakeClientAuth = context.properties().featureFlags().useAccessControlTlsHandshakeClientAuth() &&
cluster.getHttp().getAccessControl()
.map(accessControl -> accessControl.clientAuthentication)
.map(clientAuth -> clientAuth.equals(AccessControl.ClientAuthentication.need))
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
index 34b6dd017cf..736424e263d 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
@@ -29,14 +29,14 @@ public abstract class ContentNode extends AbstractService
private final boolean skipMbusReplyThread;
private final boolean useDirectStorageApiRpc;
- public ContentNode(ModelContext.Properties properties, AbstractConfigProducer parent, String clusterName, String rootDirectory, int distributionKey) {
+ public ContentNode(ModelContext.FeatureFlags featureFlags, AbstractConfigProducer<?> parent, String clusterName, String rootDirectory, int distributionKey) {
super(parent, "" + distributionKey);
this.distributionKey = distributionKey;
- this.skipCommunicationManagerThread = properties.skipCommunicationManagerThread();
- this.skipMbusRequestThread = properties.skipMbusRequestThread();
- this.skipMbusReplyThread = properties.skipMbusReplyThread();
+ this.skipCommunicationManagerThread = featureFlags.skipCommunicationManagerThread();
+ this.skipMbusRequestThread = featureFlags.skipMbusRequestThread();
+ this.skipMbusReplyThread = featureFlags.skipMbusReplyThread();
this.rootDirectory = rootDirectory;
- this.useDirectStorageApiRpc = properties.useDirectStorageApiRpc();
+ this.useDirectStorageApiRpc = featureFlags.useDirectStorageApiRpc();
initialize();
setProp("clustertype", "content");
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
index 948093f6c77..bc1d138b6d5 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java
@@ -95,7 +95,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
ContentSearchCluster search = new ContentSearchCluster(ancestor,
clusterName,
- deployState.getProperties(),
+ deployState.getProperties().featureFlags(),
documentDefinitions,
globallyDistributedDocuments,
getFlushOnShutdown(flushOnShutdownElem, deployState),
@@ -191,7 +191,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
private ContentSearchCluster(AbstractConfigProducer parent,
String clusterName,
- ModelContext.Properties featureFlags,
+ ModelContext.FeatureFlags featureFlags,
Map<String, NewDocumentType> documentDefinitions,
Set<NewDocumentType> globallyDistributedDocuments,
boolean flushOnShutdown,
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/Distributor.java b/config-model/src/main/java/com/yahoo/vespa/model/content/Distributor.java
index f03b7144e38..ec677911da6 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/Distributor.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/Distributor.java
@@ -35,7 +35,7 @@ public class Distributor extends ContentNode {
}
Distributor(ModelContext.Properties properties, DistributorCluster parent, int distributionKey, Integer distributorBasePort, PersistenceEngine provider) {
- super(properties, parent, parent.getClusterName(),
+ super(properties.featureFlags(), parent, parent.getClusterName(),
StorageNode.rootFolder + parent.getClusterName() + "/distributor/" + distributionKey, distributionKey);
this.provider = provider;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java
index 25e3efcb78f..d7140ee0a71 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java
@@ -102,7 +102,7 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl
final ModelElement documentsNode = clusterElement.child("documents");
final GcOptions gc = parseGcOptions(documentsNode);
final boolean hasIndexedDocumentType = clusterContainsIndexedDocumentType(documentsNode);
- boolean useThreePhaseUpdates = deployState.getProperties().useThreePhaseUpdates();
+ boolean useThreePhaseUpdates = deployState.getProperties().featureFlags().useThreePhaseUpdates();
return new DistributorCluster(parent,
new BucketSplitting.Builder().build(new ModelElement(producerSpec)), gc,
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/StorageNode.java b/config-model/src/main/java/com/yahoo/vespa/model/content/StorageNode.java
index d47d77897e8..afe285faf19 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/StorageNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/StorageNode.java
@@ -3,12 +3,11 @@ package com.yahoo.vespa.model.content;
import com.yahoo.config.model.api.ModelContext;
import com.yahoo.config.model.deploy.DeployState;
-import com.yahoo.config.provision.Flavor;
+import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.vespa.config.content.StorFilestorConfig;
import com.yahoo.vespa.config.content.core.StorBucketmoverConfig;
import com.yahoo.vespa.config.content.core.StorCommunicationmanagerConfig;
import com.yahoo.vespa.config.content.core.StorServerConfig;
-import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.vespa.defaults.Defaults;
import com.yahoo.vespa.model.application.validation.RestartConfigs;
import com.yahoo.vespa.model.builder.xml.dom.ModelElement;
@@ -39,7 +38,7 @@ public class StorageNode extends ContentNode implements StorServerConfig.Produce
}
StorageNode(ModelContext.Properties properties, StorageCluster cluster, Double capacity, int distributionKey, boolean retired) {
- super(properties, cluster, cluster.getClusterName(),
+ super(properties.featureFlags(), cluster, cluster.getClusterName(),
rootFolder + cluster.getClusterName() + "/storage/" + distributionKey,
distributionKey);
this.retired = retired;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java
index fd4de13be39..ab5dab4fbb9 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/FileStorProducer.java
@@ -13,7 +13,7 @@ public class FileStorProducer implements StorFilestorConfig.Producer {
public static class Builder {
protected FileStorProducer build(ModelContext.Properties properties, ContentCluster parent, ModelElement clusterElem) {
- return new FileStorProducer(properties, parent, getThreads(clusterElem));
+ return new FileStorProducer(properties.featureFlags(), parent, getThreads(clusterElem));
}
private Integer getThreads(ModelElement clusterElem) {
@@ -60,13 +60,13 @@ public class FileStorProducer implements StorFilestorConfig.Producer {
final int twoMB = 0x200000;
return ((value + twoMB - 1)/twoMB) * twoMB;
}
- public FileStorProducer(ModelContext.Properties properties, ContentCluster parent, Integer numThreads) {
+ public FileStorProducer(ModelContext.FeatureFlags featureFlags, ContentCluster parent, Integer numThreads) {
this.numThreads = numThreads;
this.cluster = parent;
- this.reponseNumThreads = properties.defaultNumResponseThreads();
- this.responseSequencerType = convertResponseSequencerType(properties.responseSequencerType());
- useAsyncMessageHandlingOnSchedule = properties.useAsyncMessageHandlingOnSchedule();
- mergeChunkSize = alignUp2MiB(properties.mergeChunkSize()); // Align up to default huge page size.
+ this.reponseNumThreads = featureFlags.defaultNumResponseThreads();
+ this.responseSequencerType = convertResponseSequencerType(featureFlags.responseSequencerType());
+ useAsyncMessageHandlingOnSchedule = featureFlags.useAsyncMessageHandlingOnSchedule();
+ mergeChunkSize = alignUp2MiB(featureFlags.mergeChunkSize()); // Align up to default huge page size.
}
@Override
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 dc9a7cda32c..e34ccb9696c 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
@@ -15,7 +15,7 @@ public class StorServerProducer implements StorServerConfig.Producer {
ModelElement tuning = element.child("tuning");
StorServerProducer producer = new StorServerProducer(ContentCluster.getClusterId(element));
- producer.setBucketDBStripeBits(properties.contentNodeBucketDBStripeBits());
+ producer.setBucketDBStripeBits(properties.featureFlags().contentNodeBucketDBStripeBits());
if (tuning == null) return producer;
ModelElement merges = tuning.child("merges");
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java
index c8cf9407a31..9d3505e932f 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchNode.java
@@ -2,7 +2,6 @@
package com.yahoo.vespa.model.search;
import com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig;
-import com.yahoo.config.model.api.Model;
import com.yahoo.config.model.api.ModelContext;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
@@ -15,7 +14,6 @@ import com.yahoo.vespa.config.content.core.StorCommunicationmanagerConfig;
import com.yahoo.vespa.config.content.core.StorServerConfig;
import com.yahoo.vespa.config.content.core.StorStatusConfig;
import com.yahoo.vespa.config.search.core.ProtonConfig;
-import static com.yahoo.vespa.defaults.Defaults.getDefaults;
import com.yahoo.vespa.model.AbstractService;
import com.yahoo.vespa.model.PortAllocBridge;
import com.yahoo.vespa.model.admin.monitoring.Monitoring;
@@ -30,6 +28,8 @@ import org.w3c.dom.Element;
import java.util.HashMap;
import java.util.Optional;
+import static com.yahoo.vespa.defaults.Defaults.getDefaults;
+
/**
* Represents a search node (proton).
* <p>
@@ -142,7 +142,7 @@ public class SearchNode extends AbstractService implements
// Properties are set in DomSearchBuilder
this.tuning = tuning;
this.resourceLimits = resourceLimits;
- this.useFastValueTensorImplementation = props.useFastValueTensorImplementation();
+ this.useFastValueTensorImplementation = props.featureFlags().useFastValueTensorImplementation();
}
private void setPropertiesElastic(String clusterName, int distributionKey) {