Browse Source

Logging: shard store shouldn't log the entire cluster state under trace, but just its version.

If we want the entire CS, we can put the cluster.service on trace
Boaz Leskes 10 years ago
parent
commit
29c99ff23d

+ 1 - 1
core/src/main/java/org/elasticsearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java

@@ -83,7 +83,7 @@ public class TransportIndicesShardStoresAction extends TransportMasterNodeReadAc
         final String[] concreteIndices = indexNameExpressionResolver.concreteIndices(state, request);
         final Set<ShardId> shardIdsToFetch = new HashSet<>();
 
-        logger.trace("cluster state used to determine shards [{}]", state.prettyPrint());
+        logger.trace("using cluster state version [{}] to determine shards", state.version());
         // collect relevant shard ids of the requested indices for fetching store infos
         for (String index : concreteIndices) {
             IndexRoutingTable indexShardRoutingTables = routingTables.index(index);

+ 1 - 1
core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesShardStoreRequestTests.java

@@ -58,7 +58,7 @@ public class IndicesShardStoreRequestTests extends ElasticsearchIntegrationTest
     }
 
     @Test
-    @TestLogging("action.admin.indices.shards:TRACE")
+    @TestLogging("action.admin.indices.shards:TRACE,cluster.service:TRACE")
     public void testBasic() throws Exception {
         String index = "test";
         internalCluster().ensureAtLeastNumDataNodes(2);