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 might lead to premature shard deletion #21717

Closed
ywelsch opened this issue Nov 21, 2016 · 1 comment
Closed

auto_expand_replicas might lead to premature shard deletion #21717

ywelsch opened this issue Nov 21, 2016 · 1 comment
Labels
>bug :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. help wanted adoptme

Comments

@ywelsch
Copy link
Contributor

ywelsch commented Nov 21, 2016

Assume a 2-node cluster with an index with 1 primary and 1 replica. The index has auto_expand_replicas set 0-all. The second node drops, which leads to the first node automatically resetting the number_of_replicas to 0. This is a process that's triggered in a delayed fashion. MetaDataUpdateSettingsService listens on cluster state changed events and submits a cluster state update task to adjust number_of_replicas when it detects that the number of data nodes is smaller/greater than the number of currently-configured replicas. Assume this update successfully completes. When the second node rejoins, it sees a shard routing table that has all shards active (= primary only) and starts deleting it's local shard copy. Shortly thereafter (maybe a few milliseconds?) the first node updates the cluster state by auto-expanding the number of replicas back to one. The second node however has deleted the data and needs to resync the complete shard.

@clintongormley
Copy link
Contributor

Duplicate of #1873

@lcawl lcawl added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. and removed :Allocation labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. help wanted adoptme
Projects
None yet
Development

No branches or pull requests

3 participants