Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto_expand_replicas with closed indices #22993

Closed
dshopov opened this issue Feb 6, 2017 · 3 comments
Closed

auto_expand_replicas with closed indices #22993

dshopov opened this issue Feb 6, 2017 · 3 comments
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates

Comments

@dshopov
Copy link

dshopov commented Feb 6, 2017

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
@ywelsch ywelsch added the >bug label Feb 6, 2017
@clintongormley clintongormley added the :Data Management/Indices APIs APIs to create and manage indices and templates label Feb 6, 2017
@ywelsch
Copy link
Contributor

ywelsch commented Feb 6, 2017

This is indeed a bug. Two things come to my mind here:

  1. The system should probably not automatically adjust the number of replicas on a closed index.
  2. The reason why index.number_of_replicas cannot be updated on a closed index - leaving the index in an unopenable state, is not true anymore since ES v5.0.0 as we are now using allocation IDs (Allocate primary shard based on allocation IDs #14739) that don't have that problem.

@hub-cap hub-cap added :Data Management/Indices APIs APIs to create and manage indices and templates and removed :Data Management/Indices APIs APIs to create and manage indices and templates labels Mar 19, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@ywelsch
Copy link
Contributor

ywelsch commented May 9, 2018

Fixed by #30423, in particular https://github.com/elastic/elasticsearch/pull/30423/files#diff-495f5ad1cf8822630b8ab7779926d8beR136 where we now don't expand number_of_replicas when an index is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates
Projects
None yet
Development

No branches or pull requests

5 participants