zhuangchong commented on a change in pull request #8707:
URL: https://github.com/apache/dolphinscheduler/pull/8707#discussion_r820332248



##########
File path: 
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
##########
@@ -120,7 +121,7 @@ public void run() {
      * batch dispatch with thread pool
      */
     private List<TaskPriority> batchDispatch(int fetchTaskNum) throws 
TaskPriorityQueueException, InterruptedException {
-        List<TaskPriority> failedDispatchTasks = new ArrayList<>();
+        List<TaskPriority> failedDispatchTasks = 
Collections.synchronizedList(new ArrayList<>());

Review comment:
       In this method, the thread pool consumerThreadPoolExecutor operates on 
the variable failedDispatchTasks collection.
   
   
![image](https://user-images.githubusercontent.com/37063904/156955399-edf2a5ae-e7c5-43bc-b1a2-7717a89d0753.png)
   




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


Reply via email to