Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18035

Executors#newCachedThreadPool could not work as expected

    XMLWordPrintableJSON

Details

    Description

      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.

       

      public ThreadPoolExecutor(int corePoolSize,
                                int maximumPoolSize,
                                long keepAliveTime,
                                TimeUnit unit,
                                BlockingQueue<Runnable> workQueue,
                                ThreadFactory threadFactory)
      

      Attachments

        Issue Links

          Activity

            People

              chesnay Chesnay Schepler
              wangyang0918 Yang Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: