diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-07-25 15:40:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-25 15:40:04 +0200 |
commit | f2e0f65d092bf7ded347aa12a34660d3e957fe03 (patch) | |
tree | cb9a6c5739ad5a63f3f68418ae5d9011df9b98ba /config-model/src | |
parent | facb197e72d6a0f7ef5b619d0203a899334babda (diff) | |
parent | f5a0262e4fce2c7362480d6e2404a3d835aae76f (diff) |
Merge pull request #10090 from vespa-engine/bjorncs/grouping-session-cache-feature-flag
Introduce feature flag for enabling grouping session cache
Diffstat (limited to 'config-model/src')
11 files changed, 33 insertions, 14 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java index 73a401e6a2a..303052d011f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java @@ -50,11 +50,13 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat private ContainerModelEvaluation modelEvaluation; private Optional<TlsSecrets> tlsSecrets; + private final boolean enableGroupingSessionCache; public ApplicationContainerCluster(AbstractConfigProducer<?> parent, String subId, String name, DeployState deployState) { super(parent, subId, name, deployState); this.tlsSecrets = deployState.tlsSecrets(); + this.enableGroupingSessionCache = deployState.getProperties().enableGroupingSessionCache(); restApiGroup = new ConfigProducerGroup<>(this, "rest-api"); servletGroup = new ConfigProducerGroup<>(this, "servlet"); @@ -158,4 +160,7 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat return tlsSecrets; } + public boolean enableGroupingSessionCache() { + return enableGroupingSessionCache; + } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java index f1e081f4304..c973aef77e4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java @@ -1,20 +1,20 @@ // 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.container.search; +import com.yahoo.container.QrSearchersConfig; import com.yahoo.container.bundle.BundleInstantiationSpecification; import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.prelude.fastsearch.FS4ResourcePool; import com.yahoo.prelude.semantics.SemanticRulesConfig; +import com.yahoo.search.config.IndexInfoConfig; +import com.yahoo.search.pagetemplates.PageTemplatesConfig; +import com.yahoo.search.query.profile.config.QueryProfilesConfig; +import com.yahoo.vespa.configdefinition.IlscriptsConfig; import com.yahoo.vespa.model.container.ApplicationContainerCluster; import com.yahoo.vespa.model.container.component.Component; import com.yahoo.vespa.model.container.component.ContainerSubsystem; import com.yahoo.vespa.model.container.search.searchchain.LocalProvider; import com.yahoo.vespa.model.container.search.searchchain.SearchChains; -import com.yahoo.search.config.IndexInfoConfig; -import com.yahoo.vespa.configdefinition.IlscriptsConfig; -import com.yahoo.container.QrSearchersConfig; -import com.yahoo.search.query.profile.config.QueryProfilesConfig; -import com.yahoo.search.pagetemplates.PageTemplatesConfig; import com.yahoo.vespa.model.search.AbstractSearchCluster; import com.yahoo.vespa.model.search.Dispatch; import com.yahoo.vespa.model.search.IndexedSearchCluster; @@ -40,6 +40,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> private final List<AbstractSearchCluster> systems = new LinkedList<>(); private final Options options; + private final boolean enableGroupingSessionCache; private QueryProfiles queryProfiles; private SemanticRules semanticRules; @@ -51,6 +52,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> // TODO: Should be added to container instead of cluster to get proper configId for qr config. cluster.addComponent(getFS4ResourcePool()); + this.enableGroupingSessionCache = cluster.enableGroupingSessionCache(); } private static Component<?, ComponentModel> getFS4ResourcePool() { @@ -97,7 +99,10 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> @Override public void getConfig(QueryProfilesConfig.Builder builder) { - if (queryProfiles!=null) queryProfiles.getConfig(builder); + if (queryProfiles!=null) { + queryProfiles.getConfig(builder); + builder.enableGroupingSessionCache(enableGroupingSessionCache); + } } @Override diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/empty.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/empty.cfg index e69de29bb2d..13153de1644 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/empty.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/empty.cfg @@ -0,0 +1 @@ +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/explicit-reference-override.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/explicit-reference-override.cfg index 99e2e3c5dcb..b62e00a2ad5 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/explicit-reference-override.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/explicit-reference-override.cfg @@ -10,4 +10,5 @@ queryprofile[1].property[0].value "a.b" queryprofile[1].property[0].overridable "" queryprofile[1].reference[0].name "a" queryprofile[1].reference[0].value "a1" -queryprofile[1].reference[0].overridable ""
\ No newline at end of file +queryprofile[1].reference[0].overridable "" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsbe-query-profiles-simple.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsbe-query-profiles-simple.cfg index 196b6c3513a..65b4258f174 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsbe-query-profiles-simple.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsbe-query-profiles-simple.cfg @@ -16,4 +16,5 @@ queryprofile[0].queryprofilevariant[0].fordimensionvalues[0] "yahoo" queryprofile[0].queryprofilevariant[0].fordimensionvalues[1] "uk" queryprofile[0].queryprofilevariant[0].fordimensionvalues[2] "sc" queryprofile[0].queryprofilevariant[0].property[0].name "scthumbnail.sourcecountry" -queryprofile[0].queryprofilevariant[0].property[0].value "uk"
\ No newline at end of file +queryprofile[0].queryprofilevariant[0].property[0].value "uk" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsfe-query-profiles-simple.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsfe-query-profiles-simple.cfg index 461f9b606c6..b416abf7c67 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsfe-query-profiles-simple.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/newsfe-query-profiles-simple.cfg @@ -23,4 +23,5 @@ queryprofile[1].id "default" queryprofile[1].type "" queryprofile[1].reference[0].name "source.news" queryprofile[1].reference[0].value "backend/news" -queryprofile[1].reference[0].overridable ""
\ No newline at end of file +queryprofile[1].reference[0].overridable "" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants-configuration.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants-configuration.cfg index c86bba23286..352966d0d8b 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants-configuration.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants-configuration.cfg @@ -38,4 +38,5 @@ queryprofile[2].id "wparent2" queryprofile[2].type "" queryprofile[2].property[0].name "a" queryprofile[2].property[0].value "a1" -queryprofile[2].property[0].overridable ""
\ No newline at end of file +queryprofile[2].property[0].overridable "" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants2-configuration.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants2-configuration.cfg index c915cd2efd0..0f644cbb9eb 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants2-configuration.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profile-variants2-configuration.cfg @@ -58,4 +58,5 @@ queryprofile[3].property[1].overridable "false" queryprofile[3].queryprofilevariant[0].fordimensionvalues[0] "love" queryprofile[3].queryprofilevariant[0].fordimensionvalues[1] "default" queryprofile[3].queryprofilevariant[0].property[0].name "defaultIndex" -queryprofile[3].queryprofilevariant[0].property[0].value "default"
\ No newline at end of file +queryprofile[3].queryprofilevariant[0].property[0].value "default" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profiles.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profiles.cfg index 89a971adb15..4a9dabdc6ca 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profiles.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/query-profiles.cfg @@ -102,4 +102,5 @@ queryprofiletype[2].field[0].name "market" queryprofiletype[2].field[0].type "string" queryprofiletype[2].field[0].overridable false queryprofiletype[2].field[0].mandatory false -queryprofiletype[2].field[0].alias ""
\ No newline at end of file +queryprofiletype[2].field[0].alias "" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound-with-reference.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound-with-reference.cfg index e1cca7ed232..92605f504a0 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound-with-reference.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound-with-reference.cfg @@ -23,4 +23,5 @@ queryprofile[2].queryprofilevariant[0].reference[0].name "a" queryprofile[2].queryprofilevariant[0].reference[0].value "a2" queryprofile[2].queryprofilevariant[1].fordimensionvalues[0] "x2" queryprofile[2].queryprofilevariant[1].property[0].name "a.b" -queryprofile[2].queryprofilevariant[1].property[0].value "a.b.x2"
\ No newline at end of file +queryprofile[2].queryprofilevariant[1].property[0].value "a.b.x2" +enableGroupingSessionCache false
\ No newline at end of file diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound.cfg b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound.cfg index d65b3fa5f92..1e7739d9962 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound.cfg +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/variants-of-explicit-compound.cfg @@ -14,4 +14,5 @@ queryprofile[1].queryprofilevariant[0].property[0].name "a.b" queryprofile[1].queryprofilevariant[0].property[0].value "a.b.x1" queryprofile[1].queryprofilevariant[1].fordimensionvalues[0] "x2" queryprofile[1].queryprofilevariant[1].property[0].name "a.b" -queryprofile[1].queryprofilevariant[1].property[0].value "a.b.x2"
\ No newline at end of file +queryprofile[1].queryprofilevariant[1].property[0].value "a.b.x2" +enableGroupingSessionCache false
\ No newline at end of file |