[jira] [Created] (FLINK-18035) Executors#newCachedThreadPool could not work as expected

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-18035) Executors#newCachedThreadPool could not work as expected

Shang Yuanchun (Jira)
Yang Wang created FLINK-18035:
---------------------------------

             Summary: Executors#newCachedThreadPool could not work as expected
                 Key: FLINK-18035
                 URL: https://issues.apache.org/jira/browse/FLINK-18035
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Coordination
    Affects Versions: 1.11.0
            Reporter: Yang Wang
             Fix For: 1.11.0


In FLINK-17558, we introduce {{Executors#newCachedThreadPool}} to create dedicated thread pool for TaskManager io. However, it could not work as expected.

The root cause is about the following constructor of {{ThreadPoolExecutor}}. Only when the workQueue is full, new thread will be started then. So if we set a {{LinkedBlockingQueue}} with {{Integer.MAX_VALUE}} capacity, only one thread will be started.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)