From 4222478b189655c34e92ce47bbc3c4b2cceba9bd Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Mon, 18 Feb 2013 20:01:51 -0500 Subject: [PATCH] Make it simpler to determine which version of state was used to calculate health --- .../admin/cluster/health/TransportClusterHealthAction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java index a9ac48d5ad6..99e087c8d7f 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java @@ -182,6 +182,9 @@ public class TransportClusterHealthAction extends TransportMasterNodeOperationAc } 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()); ClusterHealthResponse response = new ClusterHealthResponse(clusterName.value(), validation.failures()); response.numberOfNodes = clusterState.nodes().size();