don't call clusterService again to get filtering aliases

This commit is contained in:
kimchy 2011-07-23 01:18:22 +03:00
parent ff1352f111
commit 0feb1fd216
1 changed files with 3 additions and 3 deletions

View File

@ -86,6 +86,7 @@ public abstract class TransportSearchTypeAction extends BaseAction<SearchRequest
protected final SearchRequest request; protected final SearchRequest request;
protected final ClusterState clusterState;
protected final DiscoveryNodes nodes; protected final DiscoveryNodes nodes;
protected final int expectedSuccessfulOps; protected final int expectedSuccessfulOps;
@ -106,8 +107,7 @@ public abstract class TransportSearchTypeAction extends BaseAction<SearchRequest
this.request = request; this.request = request;
this.listener = listener; this.listener = listener;
ClusterState clusterState = clusterService.state(); this.clusterState = clusterService.state();
nodes = clusterState.nodes(); nodes = clusterState.nodes();
String[] concreteIndices = clusterState.metaData().concreteIndices(request.indices(), false, true); String[] concreteIndices = clusterState.metaData().concreteIndices(request.indices(), false, true);
@ -197,7 +197,7 @@ public abstract class TransportSearchTypeAction extends BaseAction<SearchRequest
if (node == null) { if (node == null) {
onFirstPhaseResult(shard, shardIt, null); onFirstPhaseResult(shard, shardIt, null);
} else { } else {
String[] filteringAliases = clusterService.state().metaData().filteringAliases(shard.index(), request.indices()); String[] filteringAliases = clusterState.metaData().filteringAliases(shard.index(), request.indices());
sendExecuteFirstPhase(node, internalSearchRequest(shard, shardsIts.size(), request, filteringAliases), new SearchServiceListener<FirstResult>() { sendExecuteFirstPhase(node, internalSearchRequest(shard, shardsIts.size(), request, filteringAliases), new SearchServiceListener<FirstResult>() {
@Override public void onResult(FirstResult result) { @Override public void onResult(FirstResult result) {
onFirstPhaseResult(shard, result, shardIt); onFirstPhaseResult(shard, result, shardIt);