-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Enhance shrink action in ILM to specify max single primary shard size #65714
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
We discussed in team and we agreed that the easy path would be to use datastreams with automated The existing resize action which is used for shrinking or splitting indices already uses the index stats before taking an action. For example, before shrinking an index it verifies if the resulting index will exceed the maximum number of documents per shard. I assume that we could use the index stats to compute an appropriate number of shards that would fit under a maximum limit set by a request parameter. Would you be interested in working on this? |
@tlrx, thanks for your reply, I'm very glad to work on this feature. We have to use a python script to |
I think the feature itself can be implemented in the resize action itself and exposed in ILM. |
@gaobinlong is there anything else for this issue? It looks to me like #67705 and some of the follow ups should have it covered, right? |
Yes, this issue can be closed now. |
Elasticsearch version: master
Plugins installed: []
JVM version (java -version): 14.0.1
OS version (uname -a if on a Unix-like system): Mac OS 10.13.6
Description of the problem including expected versus actual behavior:
Today in the
shrink
action of ILM, we can only setnumber_of_shards
to a certain value which is a factor of the number of shards in the source index.However, in our situation, the storage of the source indexs differ from 100GB to 1TB, all of the source indexs contain 60 shards, we want to shrink the soure index according to it's storage, for example, shrink the 100GB index to 2 shards and the 1TB index to 20 shards, ensure that the max primary shard size is 50GB.
So can we add a parameter like
max_single_primary_size
in the shrink action thus the shard num of the new shrunken index can be calculated by the storage of the source index?The text was updated successfully, but these errors were encountered: