Long time running RemoteTask drains WorkerTaskExecutorThreadPool #16519
Unanswered
mumuyizhou
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm developing a task plugin which extends AbstractRemoteTask.java.
I've read source code of some other subclass of AbstractRemoteTask, e.g. DatasyncTask。
However, It seems like when
trackingApplicationStatus
, most of these remote task plugins choose awhile-loop
to track remote task status until it finishes.Now that when handling a task, it takes a thread of
WorkerTaskExecutorThreadPool
, let's imagine that we have plenty of remote tasks(like 100) waiting to be executed and each one takes a long time(for hours or even days, i think). And those tasks are already submitted to remote will keep tracking status in that while-loop and occupy a thread. Then all the remain tasks will wait in the queue until one or more previous tasks finish and return threads toWorkerTaskExecutorThreadPool
. Is that normal?In my view, a better way is submitting all the tasks to remote first, then tracking their status.
Best wishes.
Beta Was this translation helpful? Give feedback.
All reactions