ruanwenjun opened a new issue #5161:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/5161


   **Describe the question**
   code in LoggerRequestProcessor.java
   When the corePoolSize equals maximumPoolSize in the threadpool then the 
keepAliveTime is invalided.
   ```java
   public LoggerRequestProcessor() {
          this.executor = new ThreadPoolExecutor(4, 4, 10, TimeUnit.SECONDS, 
new LinkedBlockingQueue<>(100));
   }
   ```
   
   So it is suggested to use Executors.newFixedThreadPool() to create the 
threadpool there to avoid confusion.
   By the way, this processor mainly handles some io operations, maybe it is 
better to set number of threads to twice the number of cpu cores.
   ```java
   public LoggerRequestProcessor() {
         this.executor = Executors.newFixedThreadPool(Constants.CPUS * 2);
   }
   ``` 
   **Which version of DolphinScheduler:**
    -[1.3.6]
    -[dev]
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to