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
DiskThresholdDecider#remain(...) should take shards relocating away into account #8659
DiskThresholdDecider#remain(...) should take shards relocating away into account #8659
Conversation
|
||
DiskThresholdDecider diskThresholdDecider = new DiskThresholdDecider(diskSettings); | ||
MetaData metaData = MetaData.builder() | ||
.put(IndexMetaData.builder("test").numberOfShards(1).numberOfReplicas(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You put [test][0][p]
and [test][1][p]
, but then create metadata with 1 primary shard and one replica, can you change it here or in the shardSizes map?
@martijnvg left a couple of comments |
Also, 1.3.x doesn't include the take-relocations-into-account feature, so this may be pretty tough to backport without backporting the original feature, not sure if this is something we should stick in just 1.4.x and up. |
@dakrone Good point, didn't realise that. I removed the 1.3.6 version label. I'll update the PR. |
@@ -223,20 +223,28 @@ public DiskThresholdDecider(Settings settings, NodeSettingsService nodeSettingsS | |||
/** | |||
* Returns the size of all shards that are currently being relocated to | |||
* the node, but may not be finished transfering yet. | |||
* | |||
* If includeShardsMovingAway is set then the size of shards moving away is subtracted from the total size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we name this subtractShardsMovingAway
? it's clear what it means
left one comment - thanks mvg for getting this in!! |
@@ -223,20 +223,28 @@ public DiskThresholdDecider(Settings settings, NodeSettingsService nodeSettingsS | |||
/** | |||
* Returns the size of all shards that are currently being relocated to | |||
* the node, but may not be finished transfering yet. | |||
* | |||
* If subtractShardsMovingAwayRen is set then the size of shards moving away is subtracted from the total size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subtractShardsMovingAwayRen -> subtractShardsMovingAway
LGTM, left one comment about a misspelling |
oops, I'll change that. On 26 November 2014 at 09:36, Lee Hinman notifications@github.com wrote:
Met vriendelijke groet, Martijn van Groningen |
…away from a node in order to determine if a shard can remain. By taking this into account we can prevent that we move too many shards away than is necessary. Closes elastic#8538 Closes elastic#8659
f9fc09e
to
c70e09e
Compare
…away from a node in order to determine if a shard can remain. By taking this into account we can prevent that we move too many shards away than is necessary. Closes elastic#8538 Closes elastic#8659
…away from a node in order to determine if a shard can remain. By taking this into account we can prevent that we move too many shards away than is necessary. Closes elastic#8538 Closes elastic#8659
Let the disk threshold decider take into account shards moving away from a node in order to determine if a shard can remain.
By taking this into account we can prevent that we move too many shards away than is necessary.
PR for #8538