Make it simpler to determine which version of state was used to calculate health
This commit is contained in:
parent
5746c50ef9
commit
4222478b18
|
@ -182,6 +182,9 @@ public class TransportClusterHealthAction extends TransportMasterNodeOperationAc
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClusterHealthResponse clusterHealth(ClusterHealthRequest request, ClusterState clusterState) {
|
private ClusterHealthResponse clusterHealth(ClusterHealthRequest request, ClusterState clusterState) {
|
||||||
|
if (logger.isTraceEnabled()) {
|
||||||
|
logger.trace("Calculating health based on state version [{}]", clusterState.version());
|
||||||
|
}
|
||||||
RoutingTableValidation validation = clusterState.routingTable().validate(clusterState.metaData());
|
RoutingTableValidation validation = clusterState.routingTable().validate(clusterState.metaData());
|
||||||
ClusterHealthResponse response = new ClusterHealthResponse(clusterName.value(), validation.failures());
|
ClusterHealthResponse response = new ClusterHealthResponse(clusterName.value(), validation.failures());
|
||||||
response.numberOfNodes = clusterState.nodes().size();
|
response.numberOfNodes = clusterState.nodes().size();
|
||||||
|
|
Loading…
Reference in New Issue