diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-09-12 11:39:27 +0200 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-09-12 15:28:08 +0200 |
commit | 9653b487a5ed2c7a62b0c06c1215ea947a09ee30 (patch) | |
tree | 13990074b2accce222ed6c70c7a0e7901d65df00 /configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java | |
parent | 6ac162f1ec099f014ceee92c9afde50d2e3e8a33 (diff) |
Add feature flag for new content layer metadata features
Exposed as an integer rather than a bool to account for future
additions without needing to add more feature flags to the mix.
In particular this is because those additions are expected to
require the other additions to be present, so it's not a mix
and match situation.
Only values 0 (legacy) and 1 (operation cancellation) map to
any underlying configs at this time, though any higher number
will transparently enable cancellation. Value 2 is documented
based on its intended future semantics.
Diffstat (limited to 'configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java | 3 |
1 files changed, 3 insertions, 0 deletions
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 ada82abf907..f08e5444b9e 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 @@ -201,6 +201,7 @@ public class ModelContextImpl implements ModelContext { private final boolean enableDataplaneProxy; private final boolean enableNestedMultivalueGrouping; private final boolean useReconfigurableDispatcher; + private final int contentLayerMetadataFeatureLevel; public FeatureFlags(FlagSource source, ApplicationId appId, Version version) { this.defaultTermwiseLimit = flagValue(source, appId, version, Flags.DEFAULT_TERM_WISE_LIMIT); @@ -243,6 +244,7 @@ public class ModelContextImpl implements ModelContext { this.enableDataplaneProxy = flagValue(source, appId, version, Flags.ENABLE_DATAPLANE_PROXY); this.enableNestedMultivalueGrouping = flagValue(source, appId, version, Flags.ENABLE_NESTED_MULTIVALUE_GROUPING); this.useReconfigurableDispatcher = flagValue(source, appId, version, Flags.USE_RECONFIGURABLE_DISPATCHER); + this.contentLayerMetadataFeatureLevel = flagValue(source, appId, version, Flags.CONTENT_LAYER_METADATA_FEATURE_LEVEL); } @Override public int heapSizePercentage() { return heapPercentage; } @@ -293,6 +295,7 @@ public class ModelContextImpl implements ModelContext { @Override public boolean enableDataplaneProxy() { return enableDataplaneProxy; } @Override public boolean enableNestedMultivalueGrouping() { return enableNestedMultivalueGrouping; } @Override public boolean useReconfigurableDispatcher() { return useReconfigurableDispatcher; } + @Override public int contentLayerMetadataFeatureLevel() { return contentLayerMetadataFeatureLevel; } private static <V> V flagValue(FlagSource source, ApplicationId appId, Version vespaVersion, UnboundFlag<? extends V, ?, ?> flag) { return flag.bindTo(source) |