From 76b32a646c644c3eaf41758f91887cab58c22d08 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Fri, 4 May 2012 17:06:34 +0300 Subject: [PATCH] When setting `index.recovery.initial_shards` in the config file, it is ignored, closes #1912. --- .../org/elasticsearch/gateway/local/LocalGatewayAllocator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/gateway/local/LocalGatewayAllocator.java b/src/main/java/org/elasticsearch/gateway/local/LocalGatewayAllocator.java index 7026f05f082..7422b87b095 100644 --- a/src/main/java/org/elasticsearch/gateway/local/LocalGatewayAllocator.java +++ b/src/main/java/org/elasticsearch/gateway/local/LocalGatewayAllocator.java @@ -156,7 +156,7 @@ public class LocalGatewayAllocator extends AbstractComponent implements GatewayA int requiredAllocation = 1; try { IndexMetaData indexMetaData = routingNodes.metaData().index(shard.index()); - String initialShards = indexMetaData.settings().get("index.recovery.initial_shards", this.initialShards); + String initialShards = indexMetaData.settings().get("index.recovery.initial_shards", settings.get("index.recovery.initial_shards", this.initialShards)); if ("quorum".equals(initialShards)) { if (indexMetaData.numberOfReplicas() > 1) { requiredAllocation = ((1 + indexMetaData.numberOfReplicas()) / 2) + 1;