IndicesExistsRequest throws IndexMissingException, closes #1133.

This commit is contained in:
kimchy 2011-07-19 23:42:42 +03:00
parent c662972230
commit 04b8245d96
2 changed files with 6 additions and 1 deletions

View File

@ -61,7 +61,8 @@ public class TransportIndicesExistsAction extends TransportMasterNodeOperationAc
}
@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);
}

View File

@ -125,6 +125,10 @@ public class DocumentActionsTests extends AbstractNodesTests {
IndicesExistsResponse indicesExistsResponse = client1.admin().indices().prepareExists(getConcreteIndexName()).execute().actionGet();
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");
ClearIndicesCacheResponse clearIndicesCacheResponse = client1.admin().indices().clearCache(clearIndicesCacheRequest("test")).actionGet();
assertThat(clearIndicesCacheResponse.successfulShards(), equalTo(10));