-
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
Force merge should be cancellable #17094
Comments
how would that work? you can't just go and stop the merge once it's kicked off - I think having an API to do that is misleading and will be disappointing to users |
That is why I made this a discussion! I haven't read much of that code but it feels like an "obvious" use for cancellable tasks. If it is hard to impossible at least we'll have this issue we can point people to when they ask for it. |
Perhaps it can short circuit? Since force merge is actually a series of merges in the background, maybe it can just stop in the middle if possible? Then perhaps we can augment the API to state where it is so that it can succeed / fail? |
I need this api. Once start it , it takes long time to finish the merging work. |
So it could finish the current segment merges but not start any new segment merges? And managing it with the tasks api would be nice. |
Pinging @elastic/es-core-infra |
I'm afraid we don't have the underlying infrastructure to be able to accomplish this - see #15975 |
I think we should reconsider this. Long-running force-merge tasks are something that still comes up quite often as a supportability concern and although we don't have the infrastructure to promptly cancel a merge that's running on a shard we can at least avoid starting work on subsequent shards targeted by the same request. I believe that plus some slightly better progress information (#15975 (comment)) plus feedback when a task is cancelled (#72907) (plus a few lines in the docs) would solve some issues and for the remainder it would at least improve our understanding of the problem. |
I think it'd be very useful when we don't have enough storage anymore. Stopping merge process early will prevent disaster |
We have the infrastructure to make long running stuff cancellable. Force merge seems like something that you might want to cancel.
Cancel doesn't have to immediately cancel (can't/shouldn't kill threads in Java), just make a reasonably good effort to cancel the task.
The text was updated successfully, but these errors were encountered: