aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-30 09:30:49 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-30 10:23:38 +0200
commite7d6baa6981edceff032b2d685d70b76c476828e (patch)
tree0a2bb7fc25591f3b62cddccbc7afb4ca9a51aa9e /config-model/src/main
parent904eac185da61419c9c7e244835c1704c318c134 (diff)
Propagate the configured slime decode type into the rpc summary handling.
Diffstat (limited to 'config-model/src/main')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java6
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java11
2 files changed, 17 insertions, 0 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 ecbb990f096..c72aa23a836 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, ModelContext.Fea
private double defaultTermwiseLimit = 1.0;
private String jvmGCOptions = null;
private String queryDispatchPolicy = "adaptive";
+ private String summaryDecodePolicy = "eager";
private String sequencerType = "THROUGHPUT";
private boolean firstTimeDeployment = false;
private String responseSequencerType = "ADAPTIVE";
@@ -134,6 +135,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public int heapSizePercentage() { return heapSizePercentage; }
@Override public int rpcEventsBeforeWakeup() { return rpc_events_before_wakeup; }
@Override public String queryDispatchPolicy() { return queryDispatchPolicy; }
+ @Override public String summaryDecodePolicy() { return summaryDecodePolicy; }
@Override public boolean useRestrictedDataPlaneBindings() { return useRestrictedDataPlaneBindings; }
@Override public Optional<CloudAccount> cloudAccount() { return cloudAccount; }
@Override public boolean allowUserFilters() { return allowUserFilters; }
@@ -191,6 +193,10 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
queryDispatchPolicy = policy;
return this;
}
+ public TestProperties setSummaryDecodePolicy(String type) {
+ summaryDecodePolicy = type;
+ return this;
+ }
public TestProperties setFeedSequencerType(String type) {
sequencerType = type;
return this;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
index 4ed8c5ab2e8..670460a9f9f 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
@@ -64,6 +64,7 @@ public class IndexedSearchCluster extends SearchCluster
private final List<SearchNode> searchNodes = new ArrayList<>();
private final DispatchTuning.DispatchPolicy defaultDispatchPolicy;
private final double dispatchWarmup;
+ private final String summaryDecodePolicy;
/**
* Returns the document selector that is able to resolve what documents are to be routed to this search cluster.
* This string uses the document selector language as defined in the "document" module.
@@ -80,6 +81,7 @@ public class IndexedSearchCluster extends SearchCluster
rootDispatch = new DispatchGroup(this);
defaultDispatchPolicy = DispatchTuning.Builder.toDispatchPolicy(featureFlags.queryDispatchPolicy());
dispatchWarmup = featureFlags.queryDispatchWarmup();
+ summaryDecodePolicy = featureFlags.summaryDecodePolicy();
}
@Override
@@ -337,6 +339,15 @@ public class IndexedSearchCluster extends SearchCluster
builder.maxWaitAfterCoverageFactor(searchCoverage.getMaxWaitAfterCoverageFactor());
}
builder.warmuptime(dispatchWarmup);
+ builder.summaryDecodePolicy(toSummaryDecoding(summaryDecodePolicy));
+ }
+
+ private DispatchConfig.SummaryDecodePolicy.Enum toSummaryDecoding(String summaryDecodeType) {
+ return switch (summaryDecodeType.toLowerCase()) {
+ case "eager" -> DispatchConfig.SummaryDecodePolicy.EAGER;
+ case "ondemand","on-demand" -> DispatchConfig.SummaryDecodePolicy.Enum.ONDEMAND;
+ default -> DispatchConfig.SummaryDecodePolicy.Enum.EAGER;
+ };
}
@Override