Store: improved trace logging for shard active requests

This commit is contained in:
Boaz Leskes 2014-09-10 12:32:30 +02:00
parent 18f58682e7
commit fc89316b1b
1 changed files with 2 additions and 1 deletions

View File

@ -245,6 +245,7 @@ public class IndicesStore extends AbstractComponent implements ClusterStateListe
ShardActiveResponseHandler responseHandler = new ShardActiveResponseHandler(indexShardRoutingTable.shardId(), state, requests.size()); ShardActiveResponseHandler responseHandler = new ShardActiveResponseHandler(indexShardRoutingTable.shardId(), state, requests.size());
for (Tuple<DiscoveryNode, ShardActiveRequest> request : requests) { for (Tuple<DiscoveryNode, ShardActiveRequest> request : requests) {
logger.trace("{} sending shard active check to {}", request.v2().shardId, request.v1());
transportService.sendRequest(request.v1(), ACTION_SHARD_EXISTS, request.v2(), responseHandler); transportService.sendRequest(request.v1(), ACTION_SHARD_EXISTS, request.v2(), responseHandler);
} }
} }
@ -272,8 +273,8 @@ public class IndicesStore extends AbstractComponent implements ClusterStateListe
@Override @Override
public void handleResponse(ShardActiveResponse response) { public void handleResponse(ShardActiveResponse response) {
logger.trace("{} is {}active on node {}", shardId, response.shardActive ? "" : "not ", response.node);
if (response.shardActive) { if (response.shardActive) {
logger.trace("[{}] exists on node [{}]", shardId, response.node);
activeCopies.incrementAndGet(); activeCopies.incrementAndGet();
} }