fix error when trying to delete all indices and none exists

This commit is contained in:
kimchy 2011-04-07 20:08:53 +03:00
parent ca01dc7a09
commit 93372868a2
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ public class TransportDeleteIndexAction extends TransportMasterNodeOperationActi
}
@Override protected DeleteIndexResponse masterOperation(DeleteIndexRequest request, final ClusterState state) throws ElasticSearchException {
if (request.indices().length == 0) {
return new DeleteIndexResponse(true);
}
final AtomicReference<DeleteIndexResponse> responseRef = new AtomicReference<DeleteIndexResponse>();
final AtomicReference<Throwable> failureRef = new AtomicReference<Throwable>();
final CountDownLatch latch = new CountDownLatch(request.indices().length);