remove duplicate logic for request resolution and routing verification

This commit is contained in:
Areek Zillur 2016-10-06 14:53:04 -04:00
parent 42bc2d15be
commit 2a651fc296
1 changed files with 0 additions and 8 deletions

View File

@ -100,14 +100,6 @@ public class TransportUpdateAction extends TransportWriteAction<UpdateRequest, U
request.setShardId(shardId);
}
public static void resolveAndValidateRouting(MetaData metaData, String concreteIndex, UpdateRequest request) {
request.routing((metaData.resolveIndexRouting(request.parent(), request.routing(), request.index())));
// Fail fast on the node that received the request, rather than failing when translating on the index or delete request.
if (request.routing() == null && metaData.routingRequired(concreteIndex, request.type())) {
throw new RoutingMissingException(concreteIndex, request.type(), request.id());
}
}
@Override
protected void doExecute(Task task, UpdateRequest request, ActionListener<UpdateResponse> listener) {
// if we don't have a master, we don't have metadata, that's fine, let it find a master using create index API