-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Shards should rebalance across multiple path.data on one node #11271
Comments
+1, I think instead of doing the average for all the paths we can just use the |
I think so, at least for the logic that notices when a node is "getting full" and triggers a rebalance. |
I think there are only two possible solutions here:
|
If we remove multi-path support, users can run multiple instances per server, and we'd need to provide a tool to migrate data before starting the cluster (or use snapshot/restore) |
…ation Today we only guess how big the shard will be that we are allocating on a node. Yet, we have this information on the master but it's not available on the data nodes when we pick a data path for the shard. We use some rather simple heuristic based on existing shard sizes on this node which might be complete bogus. This change adds the expected shard size to the ShardRouting for RELOCATING and INITIALIZING shards to be used on the actual node to find the best data path for the shard. Closes elastic#11271
Follow-on from #11185:
As of #9398 we now allocate an entire shard to one path on node's path.data, instead of file by file.
Even though we do the initial allocation to the path.data with the most free space, if the shards then grow in lopsided ways (an "adversary"), we can get to a state where one path.data is nearly full while others are very empty, on a single node. I suspect such adversaries would not be uncommon in practice...
Yet, DiskThresholdDecider only looks at total usable space on the node (not per-path on path.data) so it won't notice when only one path is close to full... we need to fix that? Also, the shard allocation process needs to see/address each path.data separately somehow?
Sometimes a shard would just move from one path.data to another path.data on the same node (maybe we should bias for that, all other criteria being nearly equal, since we save on network traffic).
I think it's important to fix this but this is beyond my knowledge of ES now ...
The text was updated successfully, but these errors were encountered: