When setting `index.recovery.initial_shards` in the config file, it is ignored, closes #1912.
This commit is contained in:
parent
0219471c00
commit
76b32a646c
|
@ -156,7 +156,7 @@ public class LocalGatewayAllocator extends AbstractComponent implements GatewayA
|
||||||
int requiredAllocation = 1;
|
int requiredAllocation = 1;
|
||||||
try {
|
try {
|
||||||
IndexMetaData indexMetaData = routingNodes.metaData().index(shard.index());
|
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 ("quorum".equals(initialShards)) {
|
||||||
if (indexMetaData.numberOfReplicas() > 1) {
|
if (indexMetaData.numberOfReplicas() > 1) {
|
||||||
requiredAllocation = ((1 + indexMetaData.numberOfReplicas()) / 2) + 1;
|
requiredAllocation = ((1 + indexMetaData.numberOfReplicas()) / 2) + 1;
|
||||||
|
|
Loading…
Reference in New Issue