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

Do not update number of replicas on no indices #34481

Merged
merged 2 commits into from
Oct 15, 2018

Commits on Oct 15, 2018

  1. Do not update number of replicas on no indices

    Today when submitting an update settings request to update the number of
    replicas with a wildcard that does not match any indices and allow no
    indices is set to true, the request ends up being interpreted as
    updating the number of replicas for all indices. That is, consider the
    following sequence:
    
    PUT /test-index
    {
      "settings": {
        "index.number_of_replicas": 0
      }
    }
    
    PUT /non-existent-*/_settings?expand_wildcards=open&allow_no_indices=true
    {
      "settings": {
        "index.number_of_replicas": 1
      }
    }
    
    GET /test-index/_settings
    
    The latter will show that the number of replicas on test-index is now
    one. This is surprising, and should be considered a bug.
    
    The underlying problem here is treating no indices in the underlying
    methods used to update the routing table and the metadata as meaning all
    indices. This commit takes away this assumption. Tests that relied on
    this behavior have been changed to no longer rely on this.
    
    A test for this situation is added in UpdateNumberOfReplicasIT.
    jasontedor committed Oct 15, 2018
    Configuration menu
    Copy the full SHA
    93500ef View commit details
    Browse the repository at this point in the history
  2. Add a missing final

    jasontedor committed Oct 15, 2018
    Configuration menu
    Copy the full SHA
    7a2e0c8 View commit details
    Browse the repository at this point in the history