Skip to content

auto_expand_replicas with closed indices #22993

@dshopov

Description

@dshopov

Elasticsearch version: 5.2.0
Description of the problem including expected versus actual behavior:
Setting auto_expand_replicas works as expected when you add a node, however if you have a closed index with the setting ES will not update the number_of_replicas on any index when stopping a node.

I guess this is connected to the error you get when trying to set number_of_replicas on a closed index:
Can't update [index.number_of_replicas] on closed indices [[index/lHETwEIvTy23Zm2kaAhJ0g]] - can leave index in an unopenable state

Steps to reproduce:

  1. Make 2 indices with "auto_expand_replicas": "0-all"
  2. Close one of the indices
  3. Add a node to expand the replicas to nodes-1 (as expected)
  4. Stop one node - cluster goes to yellow state

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Data Management/Indices APIsDO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead.>bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions