Merge pull request #13218 from brwe/resolve-index-default-impl
add default impl for resolveIndex()
This commit is contained in:
commit
a7e240077d
|
@ -94,11 +94,6 @@ public class TransportDeleteAction extends TransportReplicationAction<DeleteRequ
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean resolveIndex() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void resolveRequest(final ClusterState state, final InternalRequest request, final ActionListener<DeleteResponse> listener) {
|
||||
request.request().routing(state.metaData().resolveIndexRouting(request.request().routing(), request.request().index()));
|
||||
|
|
|
@ -120,11 +120,6 @@ public class TransportIndexAction extends TransportReplicationAction<IndexReques
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean resolveIndex() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void resolveRequest(ClusterState state, InternalRequest request, ActionListener<IndexResponse> indexResponseActionListener) {
|
||||
MetaData metaData = clusterService.state().metaData();
|
||||
|
|
|
@ -142,7 +142,9 @@ public abstract class TransportReplicationAction<Request extends ReplicationRequ
|
|||
return state.blocks().indexBlockedException(ClusterBlockLevel.WRITE, request.concreteIndex());
|
||||
}
|
||||
|
||||
protected abstract boolean resolveIndex();
|
||||
protected boolean resolveIndex() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the request, by default doing nothing. Can be subclassed to do
|
||||
|
|
Loading…
Reference in New Issue