# Auto\_expand\_replicas not working on enrich index

**URL:** <https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569>\
**Category:** Elasticsearch\
**Created:** [September 2, 2022, 4:35pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569 "2022-09-02T16:35:11Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 6, 2022, 12:30pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/21 "2022-09-06T12:30:02Z")

</div>

Yes, OK. I created the index using an explicit `null` value for this setting

```auto
PUT /testing_auto_expand_replicas
{
  "settings": {
    "auto_expand_replicas": "0-all",
    "index.routing.allocation.include._tier_preference": null
  }
}

```

and the index is still not replicated

```auto
GET /testing_auto_expand_replicas/_settings

{
  "testing_auto_expand_replicas" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "1",
        "auto_expand_replicas" : "0-all",
        "provided_name" : "testing_auto_expand_replicas",
        "max_inner_result_window" : "10000",
        "creation_date" : "1662467313585",
        "number_of_replicas" : "0",
        "uuid" : "LuWoQP9UQjuyZAKh1pet6w",
        "version" : {
          "created" : "7170199"
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 6, 2022, 12:33pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/22 "2022-09-06T12:33:43Z")

</div>

And what is the result of the allocation explain for this test index?

This one: `GET _cluster/allocation/explain?include_yes_decisions`

---

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 6, 2022, 12:35pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/23 "2022-09-06T12:35:56Z")

</div>

Here it is

```auto
GET _cluster/allocation/explain?include_yes_decisions
{
  "index": "testing_auto_expand_replicas",
  "shard": 0,
  "primary": true
}

{
  "index" : "testing_auto_expand_replicas",
  "shard" : 0,
  "primary" : true,
  "current_state" : "started",
  "current_node" : {
    "id" : "PS1WfPGWS4KvFDJbACEG4A",
    "name" : "es-01.stordata.dc",
    "transport_address" : "10.254.249.10:9300",
    "attributes" : {
      "ml.machine_memory" : "135075225600",
      "ml.max_open_jobs" : "512",
      "xpack.installed" : "true",
      "ml.max_jvm_size" : "33285996544",
      "transform.node" : "true"
    },
    "weight_ranking" : 1
  },
  "can_remain_on_current_node" : "yes",
  "can_rebalance_cluster" : "yes",
  "can_rebalance_to_other_node" : "no",
  "rebalance_explanation" : "cannot rebalance as no target node exists that can both allocate this shard and improve the cluster balance",
  "node_allocation_decisions" : [
    {
      "node_id" : "NeLqOXVAQa-38GN1jWyn_Q",
      "node_name" : "es-03.stordata.dc",
      "transport_address" : "10.254.249.12:9300",
      "node_attributes" : {
        "ml.machine_memory" : "135075368960",
        "ml.max_open_jobs" : "512",
        "xpack.installed" : "true",
        "ml.max_jvm_size" : "33285996544",
        "transform.node" : "true"
      },
      "node_decision" : "worse_balance",
      "weight_ranking" : 1,
      "deciders" : [
        {
          "decider" : "max_retry",
          "decision" : "YES",
          "explanation" : "shard has no previous failures"
        },
        {
          "decider" : "replica_after_primary_active",
          "decision" : "YES",
          "explanation" : "shard is primary and can be allocated"
        },
        {
          "decider" : "enable",
          "decision" : "YES",
          "explanation" : "all allocations are allowed"
        },
        {
          "decider" : "node_version",
          "decision" : "YES",
          "explanation" : "can relocate primary shard from a node with version [7.17.1] to a node with equal-or-newer version [7.17.1]"
        },
        {
          "decider" : "snapshot_in_progress",
          "decision" : "YES",
          "explanation" : "no snapshots are currently running"
        },
        {
          "decider" : "restore_in_progress",
          "decision" : "YES",
          "explanation" : "ignored as shard is not being recovered from a snapshot"
        },
        {
          "decider" : "node_shutdown",
          "decision" : "YES",
          "explanation" : "this node is not currently shutting down"
        },
        {
          "decider" : "node_replacement",
          "decision" : "YES",
          "explanation" : "neither the source nor target node are part of an ongoing node replacement (no replacements)"
        },
        {
          "decider" : "filter",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require filters"
        },
        {
          "decider" : "same_shard",
          "decision" : "YES",
          "explanation" : "this node does not hold a copy of this shard"
        },
        {
          "decider" : "disk_threshold",
          "decision" : "YES",
          "explanation" : "enough disk for shard on node, free: [1.3tb], shard size: [226b], free after allocating shard: [1.3tb]"
        },
        {
          "decider" : "throttling",
          "decision" : "YES",
          "explanation" : "below shard recovery limit of outgoing: [0 < 4] incoming: [0 < 4]"
        },
        {
          "decider" : "shards_limit",
          "decision" : "YES",
          "explanation" : "total shard limits are disabled: [index: -1, cluster: -1] <= 0"
        },
        {
          "decider" : "awareness",
          "decision" : "YES",
          "explanation" : "allocation awareness is not enabled, set cluster setting [cluster.routing.allocation.awareness.attributes] to enable it"
        },
        {
          "decider" : "data_tier",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require/prefer tier filters"
        },
        {
          "decider" : "ccr_primary_follower",
          "decision" : "YES",
          "explanation" : "shard is not a follower and is not under the purview of this decider"
        },
        {
          "decider" : "searchable_snapshots",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshot_repository_exists",
          "decision" : "YES",
          "explanation" : "this decider only applies to indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshots_enable",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "dedicated_frozen_node",
          "decision" : "YES",
          "explanation" : "this node's data roles are not exactly [data_frozen] so it is not a dedicated frozen node"
        }
      ]
    },
    {
      "node_id" : "qZMbs-d_QcOGh3Ve2DS1ug",
      "node_name" : "es-02.stordata.dc",
      "transport_address" : "10.254.249.11:9300",
      "node_attributes" : {
        "ml.machine_memory" : "135075360768",
        "ml.max_open_jobs" : "512",
        "xpack.installed" : "true",
        "ml.max_jvm_size" : "33285996544",
        "transform.node" : "true"
      },
      "node_decision" : "worse_balance",
      "weight_ranking" : 1,
      "deciders" : [
        {
          "decider" : "max_retry",
          "decision" : "YES",
          "explanation" : "shard has no previous failures"
        },
        {
          "decider" : "replica_after_primary_active",
          "decision" : "YES",
          "explanation" : "shard is primary and can be allocated"
        },
        {
          "decider" : "enable",
          "decision" : "YES",
          "explanation" : "all allocations are allowed"
        },
        {
          "decider" : "node_version",
          "decision" : "YES",
          "explanation" : "can relocate primary shard from a node with version [7.17.1] to a node with equal-or-newer version [7.17.1]"
        },
        {
          "decider" : "snapshot_in_progress",
          "decision" : "YES",
          "explanation" : "no snapshots are currently running"
        },
        {
          "decider" : "restore_in_progress",
          "decision" : "YES",
          "explanation" : "ignored as shard is not being recovered from a snapshot"
        },
        {
          "decider" : "node_shutdown",
          "decision" : "YES",
          "explanation" : "node [qZMbs-d_QcOGh3Ve2DS1ug] is preparing to restart, but will remain in the cluster"
        },
        {
          "decider" : "node_replacement",
          "decision" : "YES",
          "explanation" : "neither the source nor target node are part of an ongoing node replacement (no replacements)"
        },
        {
          "decider" : "filter",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require filters"
        },
        {
          "decider" : "same_shard",
          "decision" : "YES",
          "explanation" : "this node does not hold a copy of this shard"
        },
        {
          "decider" : "disk_threshold",
          "decision" : "YES",
          "explanation" : "enough disk for shard on node, free: [1.3tb], shard size: [226b], free after allocating shard: [1.3tb]"
        },
        {
          "decider" : "throttling",
          "decision" : "YES",
          "explanation" : "below shard recovery limit of outgoing: [0 < 4] incoming: [0 < 4]"
        },
        {
          "decider" : "shards_limit",
          "decision" : "YES",
          "explanation" : "total shard limits are disabled: [index: -1, cluster: -1] <= 0"
        },
        {
          "decider" : "awareness",
          "decision" : "YES",
          "explanation" : "allocation awareness is not enabled, set cluster setting [cluster.routing.allocation.awareness.attributes] to enable it"
        },
        {
          "decider" : "data_tier",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require/prefer tier filters"
        },
        {
          "decider" : "ccr_primary_follower",
          "decision" : "YES",
          "explanation" : "shard is not a follower and is not under the purview of this decider"
        },
        {
          "decider" : "searchable_snapshots",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshot_repository_exists",
          "decision" : "YES",
          "explanation" : "this decider only applies to indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshots_enable",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "dedicated_frozen_node",
          "decision" : "YES",
          "explanation" : "this node's data roles are not exactly [data_frozen] so it is not a dedicated frozen node"
        }
      ]
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 6, 2022, 12:42pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/24 "2022-09-06T12:42:33Z")

</div>

> [@ddolcimascolo](#):
>
> `"number_of_replicas" : "0"`

Can you try to set this to a higher value as well? I believe `auto_expand_replicas` should override this setting, but maybe that has changed?

---

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 6, 2022, 12:46pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/25 "2022-09-06T12:46:31Z")

</div>

Sure thing. The `number_of_replicas` setting is immediately overwritten to 0 in this case

```auto
PUT /testing_auto_expand_replicas
{
  "settings": {
    "auto_expand_replicas": "0-all",
    "index.routing.allocation.include._tier_preference": null,
    "number_of_replicas": 2
  }
}

```

```auto
GET /testing_auto_expand_replicas/_settings

{
  "testing_auto_expand_replicas" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "1",
        "auto_expand_replicas" : "0-all",
        "provided_name" : "testing_auto_expand_replicas",
        "max_inner_result_window" : "10000",
        "creation_date" : "1662468286411",
        "number_of_replicas" : "0",
        "uuid" : "Ed1l4I8aS7ywEI0BNpuNwA",
        "version" : {
          "created" : "7170199"
        }
      }
    }
  }
}

```

And the allocation explain, in case you need it

```auto
{
  "index" : "testing_auto_expand_replicas",
  "shard" : 0,
  "primary" : true,
  "current_state" : "started",
  "current_node" : {
    "id" : "PS1WfPGWS4KvFDJbACEG4A",
    "name" : "es-01.stordata.dc",
    "transport_address" : "10.254.249.10:9300",
    "attributes" : {
      "ml.machine_memory" : "135075225600",
      "ml.max_open_jobs" : "512",
      "xpack.installed" : "true",
      "ml.max_jvm_size" : "33285996544",
      "transform.node" : "true"
    },
    "weight_ranking" : 1
  },
  "can_remain_on_current_node" : "yes",
  "can_rebalance_cluster" : "yes",
  "can_rebalance_to_other_node" : "no",
  "rebalance_explanation" : "cannot rebalance as no target node exists that can both allocate this shard and improve the cluster balance",
  "node_allocation_decisions" : [
    {
      "node_id" : "NeLqOXVAQa-38GN1jWyn_Q",
      "node_name" : "es-03.stordata.dc",
      "transport_address" : "10.254.249.12:9300",
      "node_attributes" : {
        "ml.machine_memory" : "135075368960",
        "ml.max_open_jobs" : "512",
        "xpack.installed" : "true",
        "ml.max_jvm_size" : "33285996544",
        "transform.node" : "true"
      },
      "node_decision" : "worse_balance",
      "weight_ranking" : 1,
      "deciders" : [
        {
          "decider" : "max_retry",
          "decision" : "YES",
          "explanation" : "shard has no previous failures"
        },
        {
          "decider" : "replica_after_primary_active",
          "decision" : "YES",
          "explanation" : "shard is primary and can be allocated"
        },
        {
          "decider" : "enable",
          "decision" : "YES",
          "explanation" : "all allocations are allowed"
        },
        {
          "decider" : "node_version",
          "decision" : "YES",
          "explanation" : "can relocate primary shard from a node with version [7.17.1] to a node with equal-or-newer version [7.17.1]"
        },
        {
          "decider" : "snapshot_in_progress",
          "decision" : "YES",
          "explanation" : "no snapshots are currently running"
        },
        {
          "decider" : "restore_in_progress",
          "decision" : "YES",
          "explanation" : "ignored as shard is not being recovered from a snapshot"
        },
        {
          "decider" : "node_shutdown",
          "decision" : "YES",
          "explanation" : "this node is not currently shutting down"
        },
        {
          "decider" : "node_replacement",
          "decision" : "YES",
          "explanation" : "neither the source nor target node are part of an ongoing node replacement (no replacements)"
        },
        {
          "decider" : "filter",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require filters"
        },
        {
          "decider" : "same_shard",
          "decision" : "YES",
          "explanation" : "this node does not hold a copy of this shard"
        },
        {
          "decider" : "disk_threshold",
          "decision" : "YES",
          "explanation" : "enough disk for shard on node, free: [1.3tb], shard size: [226b], free after allocating shard: [1.3tb]"
        },
        {
          "decider" : "throttling",
          "decision" : "YES",
          "explanation" : "below shard recovery limit of outgoing: [0 < 4] incoming: [0 < 4]"
        },
        {
          "decider" : "shards_limit",
          "decision" : "YES",
          "explanation" : "total shard limits are disabled: [index: -1, cluster: -1] <= 0"
        },
        {
          "decider" : "awareness",
          "decision" : "YES",
          "explanation" : "allocation awareness is not enabled, set cluster setting [cluster.routing.allocation.awareness.attributes] to enable it"
        },
        {
          "decider" : "data_tier",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require/prefer tier filters"
        },
        {
          "decider" : "ccr_primary_follower",
          "decision" : "YES",
          "explanation" : "shard is not a follower and is not under the purview of this decider"
        },
        {
          "decider" : "searchable_snapshots",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshot_repository_exists",
          "decision" : "YES",
          "explanation" : "this decider only applies to indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshots_enable",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "dedicated_frozen_node",
          "decision" : "YES",
          "explanation" : "this node's data roles are not exactly [data_frozen] so it is not a dedicated frozen node"
        }
      ]
    },
    {
      "node_id" : "qZMbs-d_QcOGh3Ve2DS1ug",
      "node_name" : "es-02.stordata.dc",
      "transport_address" : "10.254.249.11:9300",
      "node_attributes" : {
        "ml.machine_memory" : "135075360768",
        "ml.max_open_jobs" : "512",
        "xpack.installed" : "true",
        "ml.max_jvm_size" : "33285996544",
        "transform.node" : "true"
      },
      "node_decision" : "worse_balance",
      "weight_ranking" : 1,
      "deciders" : [
        {
          "decider" : "max_retry",
          "decision" : "YES",
          "explanation" : "shard has no previous failures"
        },
        {
          "decider" : "replica_after_primary_active",
          "decision" : "YES",
          "explanation" : "shard is primary and can be allocated"
        },
        {
          "decider" : "enable",
          "decision" : "YES",
          "explanation" : "all allocations are allowed"
        },
        {
          "decider" : "node_version",
          "decision" : "YES",
          "explanation" : "can relocate primary shard from a node with version [7.17.1] to a node with equal-or-newer version [7.17.1]"
        },
        {
          "decider" : "snapshot_in_progress",
          "decision" : "YES",
          "explanation" : "no snapshots are currently running"
        },
        {
          "decider" : "restore_in_progress",
          "decision" : "YES",
          "explanation" : "ignored as shard is not being recovered from a snapshot"
        },
        {
          "decider" : "node_shutdown",
          "decision" : "YES",
          "explanation" : "node [qZMbs-d_QcOGh3Ve2DS1ug] is preparing to restart, but will remain in the cluster"
        },
        {
          "decider" : "node_replacement",
          "decision" : "YES",
          "explanation" : "neither the source nor target node are part of an ongoing node replacement (no replacements)"
        },
        {
          "decider" : "filter",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require filters"
        },
        {
          "decider" : "same_shard",
          "decision" : "YES",
          "explanation" : "this node does not hold a copy of this shard"
        },
        {
          "decider" : "disk_threshold",
          "decision" : "YES",
          "explanation" : "enough disk for shard on node, free: [1.3tb], shard size: [226b], free after allocating shard: [1.3tb]"
        },
        {
          "decider" : "throttling",
          "decision" : "YES",
          "explanation" : "below shard recovery limit of outgoing: [0 < 4] incoming: [0 < 4]"
        },
        {
          "decider" : "shards_limit",
          "decision" : "YES",
          "explanation" : "total shard limits are disabled: [index: -1, cluster: -1] <= 0"
        },
        {
          "decider" : "awareness",
          "decision" : "YES",
          "explanation" : "allocation awareness is not enabled, set cluster setting [cluster.routing.allocation.awareness.attributes] to enable it"
        },
        {
          "decider" : "data_tier",
          "decision" : "YES",
          "explanation" : "node passes include/exclude/require/prefer tier filters"
        },
        {
          "decider" : "ccr_primary_follower",
          "decision" : "YES",
          "explanation" : "shard is not a follower and is not under the purview of this decider"
        },
        {
          "decider" : "searchable_snapshots",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshot_repository_exists",
          "decision" : "YES",
          "explanation" : "this decider only applies to indices backed by searchable snapshots"
        },
        {
          "decider" : "searchable_snapshots_enable",
          "decision" : "YES",
          "explanation" : "decider only applicable for indices backed by searchable snapshots"
        },
        {
          "decider" : "dedicated_frozen_node",
          "decision" : "YES",
          "explanation" : "this node's data roles are not exactly [data_frozen] so it is not a dedicated frozen node"
        }
      ]
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 6, 2022, 12:51pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/26 "2022-09-06T12:51:16Z")

</div>

Sounds like a bug to me then.

---

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 6, 2022, 12:54pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/27 "2022-09-06T12:54:14Z")

</div>

OK, sad. I'm opening an issue on Github then...  
Do you think restarting the nodes might help ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 6, 2022, 1:02pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/28 "2022-09-06T13:02:30Z")

</div>

It would be interesting to see if someone can reproduce it.

---

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 6, 2022, 2:58pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/29 "2022-09-06T14:58:58Z")

</div>

I've opened [Indices with auto\_expand\_replicas are not replicated · Issue #89823 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/89823)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 6, 2022, 11:27pm UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/30 "2022-09-06T23:27:55Z")

</div>

> [@ddolcimascolo](#):
>
> ```auto
> PUT /testing_auto_expand_replicas
> {
> "settings": {
> "auto_expand_replicas": null,
> "index.routing.allocation.include._tier_preference": null,
> "number_of_replicas": 2
> }
> }
> 
> ```

Assume you tested (just as a data point) that plain old 2 replicas worked without auto expand

---

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 7, 2022, 5:49am UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/31 "2022-09-07T05:49:57Z")

</div>

Yes. All of our indices use a static number of replicas (either 1 or 2) and this works well. It's really when `auto_expand_replicas` enters the game.

---

<div class="post-metadata">

**Author:** ![ddolcimascolo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddolcimascolo/32/110406_2.png) [@ddolcimascolo](https://discuss.elastic.co/u/ddolcimascolo)\
**Post date:** [September 7, 2022, 8:38am UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/32 "2022-09-07T08:38:03Z")

</div>

Guys, I've resolved the issue, though I believe there's still something strange in the behavior of Elasticsearch. Let me explain, hopefully it might help others coming around here!

So the root cause is that we rolling-restarted the cluster weeks ago in order to change the underlying nodes' storage, and we did this using the [shutdown API](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/put-shutdown.html). Incidentally, we forgot to [clear](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/delete-shutdown.html) the shutdown requests in order to "resume normal operation" as per the documentation... Right after the DELETE calls to clear the requests the system indices started to replicate on the two other nodes.

What I find strange is that regular indices were replicated correctly, only `auto_expand_replicas` was not working. If the nodes, once they rejoined the cluster after the restart, were not able to take replica shards because of the uncleared shutdown requests, I would have expected a more general problem. Also all allocation deciders are replying with a "YES" decision...

I'll comment on the Github issue, I think we can follow-up there.

Thanks everyone for your support.

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 5, 2022, 8:38am UTC](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569/33 "2022-10-05T08:38:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

[Previous page](https://discuss.elastic.co/t/auto-expand-replicas-not-working-on-enrich-index/313569.md?page=1)
