diff options
author | Jon Bratseth <bratseth@gmail.com> | 2020-04-15 22:25:30 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2020-04-15 22:25:30 +0200 |
commit | d0f7724d58a3b2cf72b26a9fc5fe3369287747fd (patch) | |
tree | a14e92c5c382caa7d78e6e49a608d6db56d88db4 /container-search/src/main/java | |
parent | 0c68f849c445c82e75ad439965e1b057cff5181e (diff) |
Don't avoid group blocking feed when groups = 1
Diffstat (limited to 'container-search/src/main/java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java b/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java index 869ea6436de..9b42ce03e6d 100644 --- a/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java +++ b/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java @@ -249,11 +249,12 @@ public class Dispatcher extends AbstractComponent { * We want to avoid groups blocking feed because their data may be out of date. * If there is a single group blocking feed, we want to reject it. * If multiple groups are blocking feed we should use them anyway as we may not have remaining - * capacity otherwise. + * capacity otherwise. Same if there are no other groups. * * @return a modifiable set containing the single group to reject, or null otherwise */ private Set<Integer> rejectGroupBlockingFeed(List<Group> groups) { + if (groups.size() == 1) return null; List<Group> groupsRejectingFeed = groups.stream().filter(Group::isBlockingWrites).collect(Collectors.toList()); if (groupsRejectingFeed.size() != 1) return null; Set<Integer> rejected = new HashSet<>(); |