diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-03-25 16:18:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-25 16:18:19 +0100 |
commit | cc953641c17addac5051d639b9b17243f5a171c2 (patch) | |
tree | b176d306db674d6bef6bbe0cb3ecca67ccc4a345 /container-search | |
parent | 9f449954e3743d827dcc017403865603d1ccb282 (diff) |
Revert "Don't take combined clusters of size 1 down"
Diffstat (limited to 'container-search')
2 files changed, 6 insertions, 23 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java index 7862648ba51..7619cb34b77 100644 --- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java +++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java @@ -78,10 +78,10 @@ public class SearchCluster implements NodeManager<Node> { this.nodesByHost = nodesByHostBuilder.build(); this.localCorpusDispatchTarget = findLocalCorpusDispatchTarget(HostName.getLocalhost(), - size, - containerClusterSize, - nodesByHost, - groups); + size, + containerClusterSize, + nodesByHost, + groups); } /* Testing only */ @@ -217,10 +217,7 @@ public class SearchCluster implements NodeManager<Node> { setInRotationOnlyIf(hasWorkingNodes()); } else if (usesLocalCorpusIn(node)) { // follow the status of this node - // Do not take this out of rotation if we're a combined cluster of size 1, - // as that can't be helpful, and leads to a deadlock where this node is never taken back in servic e - if (nodeIsWorking || size() > 1) - setInRotationOnlyIf(nodeIsWorking); + setInRotationOnlyIf(nodeIsWorking); } } diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java index ad281aeda7d..cf90a1c6d81 100644 --- a/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java +++ b/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java @@ -191,7 +191,7 @@ public class SearchClusterTest { } @Test - public void requireThatVipStatusStaysUpWithLocalDispatchAndClusterSize1() { + public void requireThatVipStatusIsDefaultDownWithOnlySingleLocalDispatch() { try (State test = new State("cluster.1", 1, HostName.getLocalhost())) { assertTrue(test.searchCluster.localCorpusDispatchTarget().isPresent()); @@ -200,20 +200,6 @@ public class SearchClusterTest { assertTrue(test.vipStatus.isInRotation()); test.numDocsPerNode.get(0).set(-1); test.waitOneFullPingRound(); - assertTrue(test.vipStatus.isInRotation()); - } - } - - @Test - public void requireThatVipStatusIsDefaultDownWithLocalDispatchAndClusterSize2() { - try (State test = new State("cluster.1", 1, HostName.getLocalhost(), "otherhost")) { - assertTrue(test.searchCluster.localCorpusDispatchTarget().isPresent()); - - assertFalse(test.vipStatus.isInRotation()); - test.waitOneFullPingRound(); - assertTrue(test.vipStatus.isInRotation()); - test.numDocsPerNode.get(0).set(-1); - test.waitOneFullPingRound(); assertFalse(test.vipStatus.isInRotation()); } } |