zhoulii commented on issue #2773: URL: https://github.com/apache/incubator-streampark/issues/2773#issuecomment-1619800800
In this situation, the thread pool is full, so the new tasks will be rejected. Increasing the num of threads or the size of blocking queue may mitigate this problem, but cannot fix it thoroughly, it's highly possible that the backlog will grows over time. Whenever [doWatch](https://github.com/apache/incubator-streampark/blob/dev/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java#L198) method is invoked, FlinkRestApiWatcher will add a monitor job for every tracked app, since [WATCHING_APPS](https://github.com/apache/incubator-streampark/blob/dev/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java#L110) contains all the apps need to be tracked, the queued tasks in the thread pool can be discarded. So I have two solutions for this issue: 1.clear all the queued tasks in thread pool when `doWatch` method is invoked; 2.set the reject policy of thread pool to `DiscardOldestPolicy` what's your opinion ? @wolfboys -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
