IndicesExistsRequest throws IndexMissingException, closes #1133.
This commit is contained in:
parent
c662972230
commit
04b8245d96
|
@ -61,7 +61,8 @@ public class TransportIndicesExistsAction extends TransportMasterNodeOperationAc
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void doExecute(IndicesExistsRequest request, ActionListener<IndicesExistsResponse> listener) {
|
@Override protected void doExecute(IndicesExistsRequest request, ActionListener<IndicesExistsResponse> listener) {
|
||||||
request.indices(clusterService.state().metaData().concreteIndices(request.indices()));
|
// don't call this since it will throw IndexMissingException
|
||||||
|
//request.indices(clusterService.state().metaData().concreteIndices(request.indices()));
|
||||||
super.doExecute(request, listener);
|
super.doExecute(request, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,10 @@ public class DocumentActionsTests extends AbstractNodesTests {
|
||||||
IndicesExistsResponse indicesExistsResponse = client1.admin().indices().prepareExists(getConcreteIndexName()).execute().actionGet();
|
IndicesExistsResponse indicesExistsResponse = client1.admin().indices().prepareExists(getConcreteIndexName()).execute().actionGet();
|
||||||
assertThat(indicesExistsResponse.exists(), equalTo(true));
|
assertThat(indicesExistsResponse.exists(), equalTo(true));
|
||||||
|
|
||||||
|
logger.info("--> index exists?, fake index");
|
||||||
|
indicesExistsResponse = client1.admin().indices().prepareExists("test1234565").execute().actionGet();
|
||||||
|
assertThat(indicesExistsResponse.exists(), equalTo(false));
|
||||||
|
|
||||||
logger.info("Clearing cache");
|
logger.info("Clearing cache");
|
||||||
ClearIndicesCacheResponse clearIndicesCacheResponse = client1.admin().indices().clearCache(clearIndicesCacheRequest("test")).actionGet();
|
ClearIndicesCacheResponse clearIndicesCacheResponse = client1.admin().indices().clearCache(clearIndicesCacheRequest("test")).actionGet();
|
||||||
assertThat(clearIndicesCacheResponse.successfulShards(), equalTo(10));
|
assertThat(clearIndicesCacheResponse.successfulShards(), equalTo(10));
|
||||||
|
|
Loading…
Reference in New Issue