-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Take Shard data path into account in DiskThresholdDecider #13195
Conversation
@@ -360,6 +365,7 @@ public void onResponse(IndicesStatsResponse indicesStatsResponse) { | |||
newShardSizes.put(sid, size); | |||
} | |||
shardSizes = Collections.unmodifiableMap(newShardSizes); | |||
shardRoutingToDataPath = newShardRoutingToDataPath; |
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.
Do we want to wrap this one in Collections.unmodifiableMap(...)
as well?
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.
yeah sure good catch!
Left just a few comments |
@dakrone pushed a new commit |
LGTM |
92a20db
to
1025e04
Compare
@dakrone thx I will give others a chance to look at it and push on monday. |
1025e04
to
8e0357c
Compare
LGTM2 . I do wonder (unrelated to this change), if things will be simpler if we keep the disk usage per path on the cluster info (rather than calc the least free space path) and make the can remain logic check each shard w.r.t it's own path. |
The path that a shard is allocated on is not taken into account when we decide to move a shard away from a node because it passed a watermark. Even worse we potentially moved away (relocated) a shard that was not even allocated on that disk but on another on the node in question. This commit adds a ShardRouting -> dataPath mapping to ClusterInfo that allows to identify on which disk the shards are allocated on. Relates to elastic#13106
8e0357c
to
a17d750
Compare
The path that a shard is allocated on is not taken into account when
we decide to move a shard away from a node because it passed a watermark.
Even worse we potentially moved away (relocated) a shard that was not even
allocated on that disk but on another on the node in question. This commit
adds a ShardRouting -> dataPath mapping to ClusterInfo that allows to identify
on which disk the shards are allocated on.
Relates to #13106