diff options
author | jonmv <venstad@gmail.com> | 2023-07-14 11:37:36 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-07-14 11:37:36 +0200 |
commit | 762d435b7ebead16a09f770d10b0a6a138ffe410 (patch) | |
tree | e51f9757399630f60898ebc70f293fcf672ffe23 /config-model/src/main/java/com/yahoo/vespa/model/container/search | |
parent | 9c208cbc41ae710b6bacbd34455b386d27ad7781 (diff) |
Add flag for reconfigurable dispatcher
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/search')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java | 5 |
1 files changed, 3 insertions, 2 deletions
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 728b4d40bdd..f0296d49472 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 @@ -51,6 +51,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> private final List<SearchCluster> searchClusters = new LinkedList<>(); private final Collection<String> schemasWithGlobalPhase; private final boolean globalPhase; + private final boolean useReconfigurableDispatcher; private QueryProfiles queryProfiles; private SemanticRules semanticRules; @@ -59,6 +60,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> public ContainerSearch(DeployState deployState, ApplicationContainerCluster cluster, SearchChains chains) { super(chains); this.globalPhase = deployState.featureFlags().enableGlobalPhase(); + this.useReconfigurableDispatcher = deployState.featureFlags().useReconfigurableDispatcher(); this.schemasWithGlobalPhase = getSchemasWithGlobalPhase(deployState); this.owningCluster = cluster; @@ -83,8 +85,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> /** Adds a Dispatcher component to the owning container cluster for each search cluster */ private void initializeDispatchers(Collection<SearchCluster> searchClusters) { - boolean useReconfigurableDispatch = false; - Class<? extends Dispatcher> dispatcherClass = useReconfigurableDispatch ? ReconfigurableDispatcher.class : Dispatcher.class; + Class<? extends Dispatcher> dispatcherClass = useReconfigurableDispatcher ? ReconfigurableDispatcher.class : Dispatcher.class; for (SearchCluster searchCluster : searchClusters) { if (searchCluster instanceof IndexedSearchCluster indexed) { var dispatcher = new DispatcherComponent(indexed, dispatcherClass); |