Skip to content
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

[Feature Request] we should print detail reason why the parent task cancelled #11830

Closed
kkewwei opened this issue Jan 10, 2024 · 1 comment · Fixed by #14604
Closed

[Feature Request] we should print detail reason why the parent task cancelled #11830

kkewwei opened this issue Jan 10, 2024 · 1 comment · Fixed by #14604
Labels
Cluster Manager enhancement Enhancement or improvement to existing feature or request Other

Comments

@kkewwei
Copy link
Contributor

kkewwei commented Jan 10, 2024

Is your feature request related to a problem? Please describe

version: Opensearch2.9

In product, we see many TaskCancelledExceptions as follows, but I can't find why the parent task was cancelled:

[2024-01-05T17:06:29,500+0800][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [master0] uncaught exception in thread [opensearch[node0][search][T#3]]
org.opensearch.tasks.TaskCancelledException: The parent task was cancelled, shouldn't start any child tasks
        at org.opensearch.tasks.TaskManager$CancellableTaskHolder.registerChildNode(TaskManager.java:666) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.tasks.TaskManager.registerChildNode(TaskManager.java:345) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.support.TransportAction.registerChildNode(TransportAction.java:76) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.support.TransportAction.execute(TransportAction.java:95) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:476) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.client.support.AbstractClient.search(AbstractClient.java:607) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.search.TransportMultiSearchAction.executeSearch(TransportMultiSearchAction.java:180) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.search.TransportMultiSearchAction$1.handleResponse(TransportMultiSearchAction.java:203) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.search.TransportMultiSearchAction$1.onFailure(TransportMultiSearchAction.java:188) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.support.TransportAction$1.onFailure(TransportAction.java:122) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.ActionListener$1.onFailure(ActionListener.java:88) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.ActionListener$5.onFailure(ActionListener.java:275) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.search.AbstractSearchAsyncAction.raisePhaseFailure(AbstractSearchAsyncAction.java:691) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:665) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.action.search.FetchSearchPhase$1.onFailure(FetchSearchPhase.java:128) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:54) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.threadpool.TaskAwareRunnable.doRun(TaskAwareRunnable.java:78) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:59) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:908) ~[opensearch-2.9.0.jar:2.9.0]
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52) ~[opensearch-2.9.0.jar:2.9.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

if we can also print the reason why the parent task cancelled.

Related component

Search

@kkewwei kkewwei added enhancement Enhancement or improvement to existing feature or request untriaged labels Jan 10, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Jan 10, 2024
@msfroh msfroh added Other and removed Search Search query, autocomplete ...etc labels Jan 10, 2024
@peternied
Copy link
Member

[Triage - attendees 1 2]
@kkewwei Thanks for filing, looking forward to pull request to include these details on cancelation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cluster Manager enhancement Enhancement or improvement to existing feature or request Other
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants