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

index.number_of_replicas behavior with index.auto_expand_replicas #27871

Closed
pickypg opened this issue Dec 18, 2017 · 3 comments
Closed

index.number_of_replicas behavior with index.auto_expand_replicas #27871

pickypg opened this issue Dec 18, 2017 · 3 comments
Labels
>bug :Core/Infra/Settings Settings infrastructure and APIs

Comments

@pickypg
Copy link
Member

pickypg commented Dec 18, 2017

When using index.auto_expand_replicas with a value other than false (its default), index.number_of_replicas is silently ignored:

DELETE /test

PUT /test
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 2,
    "auto_expand_replicas": "0-1"
  }
}

# reports "number_of_replicas" as 1 (on a multi-node cluster)
GET /test/_settings

# Shows the cluster as green with test having 1 replica
GET /_cat/indices/test?v

# Responds with { "acknowledged": true }
PUT /test/_settings
{
  "number_of_replicas": 0
}

# "test" index still has 1 replica
GET /_cat/indices/test?v

# reports number_of_replicas as 1
GET /test/_settings

# request properly succeeds
PUT /test/_settings
{
  "auto_expand_replicas": false
}

# still reports "number_of_replicas" as 1
GET /test/_settings

# actually changes "number_of_replicas" to 0
PUT /test/_settings
{
  "number_of_replicas": 0
}

I kind of wonder if we should just deprecate auto_expand_replicas and add its functionality to number_of_replicas instead?

@pickypg pickypg added :Core/Infra/Settings Settings infrastructure and APIs >bug labels Dec 18, 2017
@pickypg
Copy link
Member Author

pickypg commented Dec 18, 2017

/cc @spinscale

@spinscale
Copy link
Contributor

@pickypg duplicate of #27835 ?

@pickypg
Copy link
Member Author

pickypg commented Dec 18, 2017

Indeed! I didn't notice it when I created this one.

@pickypg pickypg closed this as completed Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Settings Settings infrastructure and APIs
Projects
None yet
Development

No branches or pull requests

2 participants