summaryrefslogtreecommitdiffstats
path: root/clustercontroller-core
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-core')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java
index c6fc9c8c184..8453fb3450c 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java
@@ -266,7 +266,7 @@ public class NodeStateChangeChecker {
numberOfGroupsToConsider = retiredAndNotUpGroups.size() - 1;
}
- var result = checkRedundancy(retiredAndNotUpGroups);
+ var result = checkRedundancy(retiredAndNotUpGroups, clusterState);
if (result.isPresent() && result.get().notAllowed())
return result;
@@ -280,15 +280,14 @@ public class NodeStateChangeChecker {
sortSetIntoList(retiredAndNotUpGroups))));
}
- // Check redundancy for nodes seen from all distributors that are UP for
+ // Check redundancy for nodes seen from all distributors that are UP in cluster state for
// storage nodes that are in groups that should be UP
- private Optional<Result> checkRedundancy(Set<Integer> retiredAndNotUpGroups) {
+ private Optional<Result> checkRedundancy(Set<Integer> retiredAndNotUpGroups, ClusterState clusterState) {
Set<Integer> indexesToCheck = new HashSet<>();
retiredAndNotUpGroups.forEach(index -> getNodesInGroup(index).forEach(node -> indexesToCheck.add(node.index())));
for (var distributorNodeInfo : clusterInfo.getDistributorNodeInfos()) {
- // Skip distributors that are DOWN (otherwise they will be UP and should be checked)
- if (distributorNodeInfo.getUserWantedState().getState() != UP) continue;
+ if (clusterState.getNodeState(distributorNodeInfo.getNode()).getState() != UP) continue;
var r = checkRedundancySeenFromDistributor(distributorNodeInfo, indexesToCheck);
if (r.notAllowed())