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

Adapt IndicesClusterStateService to use allocation ids #12397

Closed
wants to merge 2 commits into from

Commits on Jul 22, 2015

  1. Core: Adapt IndicesClusterStateService to use allocation ids

    elastic#12242 introduced a unique id for an assignment of shard to a node. We should use these id's to drive the decisions made by IndicesClusterStateService when processing the new cluster state sent by the master. If the local shard has a different allocation id than the new cluster state, the shard will be removed and a new one will be created. This fixes a couple of subtle bugs,  most notably a node previously got confused if an incoming cluster state had a newly allocated shard in the initializing state and the local copy was started (which can happen if cluster state updates are bulk processed). In that case, the node have previously re-used the local copy instead of initializing a new one.
    
     Also, as set of utility methods was introduced on ShardRouting to do various types of matching with other shard routings, giving control about what exactly should be matched (same shard id, same allocation id, all but version and shard info etc.). This is useful here, but also prepares the grounds for the change needed in elastic#12387 (making ShardRouting.equals be strict and perform exact equality).
    bleskes committed Jul 22, 2015
    Copy the full SHA
    18b6b28 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2015

  1. feedback

    bleskes committed Jul 24, 2015
    Copy the full SHA
    931ac44 View commit details
    Browse the repository at this point in the history