diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-24 12:10:45 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-24 12:10:45 +0100 |
commit | 8e2abfc58e936bd6be3194f9e02a21a9b70b7692 (patch) | |
tree | 9918c66fc57647c0b1c831223f6b0f9c5d6b680d /container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java | |
parent | 90b260e83678edc36eb877ec235e0e6ce5892a48 (diff) |
Put loadbalancer and invokerfactory in a volatile object to ensure atomic switch when reconfiguring.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java index cf161638104..fbea58054da 100644 --- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java +++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java @@ -1,8 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.dispatch.searchcluster; -import com.google.common.collect.ImmutableList; - import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; @@ -22,7 +20,7 @@ public class Group { private final static int minDocsPerNodeToRequireLowSkew = 100; private final int id; - private final ImmutableList<Node> nodes; + private final List<Node> nodes; private final AtomicBoolean hasSufficientCoverage = new AtomicBoolean(true); private final AtomicBoolean hasFullCoverage = new AtomicBoolean(true); private final AtomicLong activeDocuments = new AtomicLong(0); @@ -32,7 +30,7 @@ public class Group { public Group(int id, List<Node> nodes) { this.id = id; - this.nodes = ImmutableList.copyOf(nodes); + this.nodes = List.copyOf(nodes); int idx = 0; for(var node: nodes) { @@ -48,7 +46,7 @@ public class Group { public int id() { return id; } /** Returns the nodes in this group as an immutable list */ - public ImmutableList<Node> nodes() { return nodes; } + public List<Node> nodes() { return nodes; } /** * Returns whether this group has sufficient active documents |