diff options
author | Harald Musum <musum@verizonmedia.com> | 2019-09-20 06:48:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 06:48:05 +0200 |
commit | dbbe6e49c55399464fc33b67cb93e6ccb10eec88 (patch) | |
tree | 098f2540e98a19e19b9656d9d02ea8bba6e9c9e9 /container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java | |
parent | fcd8c24722ad701a37929b1362153aff327c7354 (diff) |
Revert "Bratseth/vip logic take 2"
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java b/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java index 78c50254a84..31af74a39b2 100644 --- a/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java +++ b/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java @@ -48,24 +48,21 @@ public abstract class InvokerFactory { * @return Optional containing the SearchInvoker or <i>empty</i> if some node in the * list is invalid and the remaining coverage is not sufficient */ - public Optional<SearchInvoker> createSearchInvoker(VespaBackEndSearcher searcher, - Query query, - OptionalInt groupId, - List<Node> nodes, - boolean acceptIncompleteCoverage) { + public Optional<SearchInvoker> createSearchInvoker(VespaBackEndSearcher searcher, Query query, OptionalInt groupId, List<Node> nodes, + boolean acceptIncompleteCoverage) { List<SearchInvoker> invokers = new ArrayList<>(nodes.size()); Set<Integer> failed = null; for (Node node : nodes) { boolean nodeAdded = false; - if (node.isWorking() != Boolean.FALSE) { + if (node.isWorking()) { Optional<SearchInvoker> invoker = createNodeSearchInvoker(searcher, query, node); - if (invoker.isPresent()) { + if(invoker.isPresent()) { invokers.add(invoker.get()); nodeAdded = true; } } - if ( ! nodeAdded) { + if (!nodeAdded) { if (failed == null) { failed = new HashSet<>(); } |