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

Change DiskThresholdDecider's behavior when factoring in leaving shards #20349

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Sep 6, 2016

This changes DiskThresholdDecider to only factor in leaving shards when
checking if a shard can remain. Previously, leaving shards were factored
in for both the canAllocate and canRemain checks, however, this
makes only the leaving shard sizes subtracted in the canRemain check.

It was possible that multiple shards relocating away from the node would
have their entire size subtracted, and the node had a chance to go over
the disk threshold (or hit the disk full) because it subtracted space
that was still being used for other in-progress relocations.

This changes DiskThresholdDecider to only factor in leaving shards when
checking if a shard can remain. Previously, leaving shards were factored
in for both the `canAllocate` and `canRemain` checks, however, this
makes only the leaving shard sizes subtracted in the `canRemain` check.

It was possible that multiple shards relocating away from the node would
have their entire size subtracted, and the node had a chance to go over
the disk threshold (or hit the disk full) because it subtracted space
that was still being used for other in-progress relocations.
@abeyad
Copy link

abeyad commented Sep 6, 2016

@dakrone this is great! LGTM

@dakrone dakrone merged commit 28d3c44 into elastic:master Sep 6, 2016
@dakrone
Copy link
Member Author

dakrone commented Sep 6, 2016

Thanks for the quick review @abeyad!

@dakrone dakrone added the v2.4.1 label Sep 7, 2016
@dakrone dakrone deleted the disk-decider-relocation-switcharoo branch January 23, 2017 17:23
@lcawl lcawl added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. 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
:Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. >enhancement v2.4.1 v5.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants