don't throw index missing when updating number of replicas on a closed index

This commit is contained in:
Shay Banon 2012-04-04 20:17:14 +03:00
parent b78680c7ae
commit f512f43ac5

View File

@ -311,7 +311,8 @@ public class RoutingTable implements Iterable<IndexRoutingTable> {
for (String index : indices) {
IndexRoutingTable indexRoutingTable = indicesRouting.get(index);
if (indexRoutingTable == null) {
throw new IndexMissingException(new Index(index));
// ignore index missing failure, its closed...
continue;
}
int currentNumberOfReplicas = indexRoutingTable.shards().get(0).size() - 1; // remove the required primary
IndexRoutingTable.Builder builder = new IndexRoutingTable.Builder(index);