Prefer local shards for validate action
This commit is contained in:
parent
be6e18cb36
commit
0cb1a2ebe1
|
@ -97,7 +97,7 @@ public class TransportValidateAction extends TransportBroadcastOperationAction<V
|
||||||
protected GroupShardsIterator shards(ValidateRequest request, String[] concreteIndices, ClusterState clusterState) {
|
protected GroupShardsIterator shards(ValidateRequest request, String[] concreteIndices, ClusterState clusterState) {
|
||||||
// Hard-code routing to limit request to a single shard.
|
// Hard-code routing to limit request to a single shard.
|
||||||
Map<String, Set<String>> routingMap = clusterState.metaData().resolveSearchRouting("0", request.indices());
|
Map<String, Set<String>> routingMap = clusterState.metaData().resolveSearchRouting("0", request.indices());
|
||||||
return clusterService.operationRouting().searchShards(clusterState, request.indices(), concreteIndices, null, routingMap, null);
|
return clusterService.operationRouting().searchShards(clusterState, request.indices(), concreteIndices, null, routingMap, "_local");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue