[ https://issues.apache.org/jira/browse/FLINK-18035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120644#comment-17120644 ]
Chesnay Schepler edited comment on FLINK-18035 at 6/2/20, 12:35 PM: -------------------------------------------------------------------- master: 092a9553efb70dcf19f6f93b1afa94c4d496beb3 1.11: 87afb9e08b7a3fb846eaa406a139646096450f50 1.10: d4f940f4bf247f47b0304401b064317de981a724 was (Author: zentol): master: 092a9553efb70dcf19f6f93b1afa94c4d496beb3 1.11: bd552c6f9c92600e6ce7297feda5b9494dfe15ec 1.10: d4f940f4bf247f47b0304401b064317de981a724 > 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, 1.10.2 > Reporter: Yang Wang > Assignee: Chesnay Schepler > Priority: Blocker > Labels: pull-request-available > Fix For: 1.11.0, 1.10.2 > > > 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. It never grows up. > > {code:java} > public ThreadPoolExecutor(int corePoolSize, > int maximumPoolSize, > long keepAliveTime, > TimeUnit unit, > BlockingQueue<Runnable> workQueue, > ThreadFactory threadFactory) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)