summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java3
-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/ContentSearchCluster.java12
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java5
-rw-r--r--flags/src/main/java/com/yahoo/vespa/flags/Flags.java6
5 files changed, 28 insertions, 5 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java
index 6c0c2c1260f..db160c5f6ae 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java
@@ -95,6 +95,9 @@ public interface ModelContext {
/// Default setting for the gc-options attribute if not specified explicit by application
String jvmGCOptions();
+ // Select sequencer type use while feeding.
+ String feedSequencerType();
+
boolean useDistributorBtreeDb();
boolean useThreePhaseUpdates();
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 2232e57a06f..181c4ec100a 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
@@ -43,6 +43,7 @@ public class TestProperties implements ModelContext.Properties {
private double threadPoolSizeFactor = 0.0;
private double queueSizeFactor = 0.0;
private String jvmGCOptions = null;
+ private String sequencerType = "LATENCY";
private Optional<EndpointCertificateSecrets> endpointCertificateSecrets = Optional.empty();
private AthenzDomain athenzDomain;
private ApplicationRoles applicationRoles;
@@ -57,7 +58,7 @@ public class TestProperties implements ModelContext.Properties {
@Override public Zone zone() { return zone; }
@Override public Set<ContainerEndpoint> endpoints() { return endpoints; }
@Override public String jvmGCOptions() { return jvmGCOptions; }
-
+ @Override public String feedSequencerType() { return sequencerType; }
@Override public boolean isBootstrap() { return false; }
@Override public boolean isFirstTimeDeployment() { return false; }
@Override public boolean useDedicatedNodeForLogserver() { return useDedicatedNodeForLogserver; }
@@ -78,6 +79,10 @@ public class TestProperties implements ModelContext.Properties {
jvmGCOptions = gcOptions;
return this;
}
+ public TestProperties setFeedSequencerType(String type) {
+ sequencerType = type;
+ return this;
+ }
public TestProperties setDefaultTermwiseLimit(double limit) {
defaultTermwiseLimit = limit;
return this;
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 6cb45c4559b..de91690cae6 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
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.content;
+import com.yahoo.config.model.api.ModelContext;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.vespa.config.search.DispatchConfig;
import com.yahoo.vespa.config.search.core.ProtonConfig;
@@ -43,7 +44,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
private final boolean flushOnShutdown;
/** If this is set up for streaming search, it is modelled as one search cluster per search definition */
- private Map<String, AbstractSearchCluster> clusters = new TreeMap<>();
+ private final Map<String, AbstractSearchCluster> clusters = new TreeMap<>();
/** The single, indexed search cluster this sets up (supporting multiple document types), or null if none */
private IndexedSearchCluster indexedCluster;
@@ -55,10 +56,11 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
private Double visibilityDelay = 0.0;
/** The search nodes of this if it does not have an indexed cluster */
- private List<SearchNode> nonIndexed = new ArrayList<>();
+ private final List<SearchNode> nonIndexed = new ArrayList<>();
- private Map<StorageGroup, NodeSpec> groupToSpecMap = new LinkedHashMap<>();
+ private final Map<StorageGroup, NodeSpec> groupToSpecMap = new LinkedHashMap<>();
private Optional<ResourceLimits> resourceLimits = Optional.empty();
+ private final ProtonConfig.Indexing.Optimize.Enum feedSequencerType;
/** Whether the nodes of this cluster also hosts a container cluster in a hosted system */
private final boolean combined;
@@ -89,6 +91,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
ContentSearchCluster search = new ContentSearchCluster(ancestor,
clusterName,
+ deployState.getProperties(),
documentDefinitions,
globallyDistributedDocuments,
getFlushOnShutdown(flushOnShutdownElem, deployState),
@@ -176,6 +179,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
private ContentSearchCluster(AbstractConfigProducer parent,
String clusterName,
+ ModelContext.Properties featureFlags,
Map<String, NewDocumentType> documentDefinitions,
Set<NewDocumentType> globallyDistributedDocuments,
boolean flushOnShutdown,
@@ -187,6 +191,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
this.globallyDistributedDocuments = globallyDistributedDocuments;
this.flushOnShutdown = flushOnShutdown;
this.combined = combined;
+ this.feedSequencerType = ProtonConfig.Indexing.Optimize.Enum.valueOf(featureFlags.feedSequencerType());
}
public void setVisibilityDelay(double delay) {
@@ -379,6 +384,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot
if (hasAnyNonIndexedCluster) {
builder.feeding.concurrency(builder.feeding.build().concurrency() * 2);
}
+ builder.indexing.optimize(feedSequencerType);
}
private boolean isGloballyDistributed(NewDocumentType docType) {
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java
index 74a9e72e255..b252ee3ef56 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java
@@ -154,6 +154,7 @@ public class ModelContextImpl implements ModelContext {
private final double threadPoolSizeFactor;
private final double queueSizefactor;
private final String jvmGCOPtions;
+ private final String feedSequencer;
private final Optional<AthenzDomain> athenzDomain;
private final Optional<ApplicationRoles> applicationRoles;
private final int jdiscHealthCheckProxyClientTimeout;
@@ -197,6 +198,8 @@ public class ModelContextImpl implements ModelContext {
.with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value();
jvmGCOPtions = Flags.JVM_GC_OPTIONS.bindTo(flagSource)
.with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value();
+ feedSequencer = Flags.FEED_SEQUENCER_TYPE.bindTo(flagSource)
+ .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value();
this.athenzDomain = athenzDomain;
this.applicationRoles = applicationRoles;
jdiscHealthCheckProxyClientTimeout = Flags.JDISC_HEALTH_CHECK_PROXY_CLIENT_TIMEOUT.bindTo(flagSource)
@@ -276,7 +279,7 @@ public class ModelContextImpl implements ModelContext {
@Override public Duration jdiscHealthCheckProxyClientTimeout() { return Duration.ofMillis(jdiscHealthCheckProxyClientTimeout); }
@Override public String jvmGCOptions() { return jvmGCOPtions; }
-
+ @Override public String feedSequencerType() { return feedSequencer; }
}
}
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
index 9737cba9291..ac9d3d6703e 100644
--- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
+++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
@@ -146,6 +146,12 @@ public class Flags {
"Takes effect at redeployment",
ZONE_ID, APPLICATION_ID);
+ public static final UnboundStringFlag FEED_SEQUENCER_TYPE = defineStringFlag(
+ "feed-sequencer-type", "",
+ "Selects type of sequenced executor used for feeding, valid values are LATENCY, ADAPTIVE, THROUGHPUT",
+ "Takes effect at redeployment",
+ ZONE_ID, APPLICATION_ID);
+
public static final UnboundBooleanFlag USE_DISTRIBUTOR_BTREE_DB = defineFeatureFlag(
"use-distributor-btree-db", true,
"Whether to use the new B-tree bucket database in the distributors.",