EmmyMiao87 commented on a change in pull request #333: Add distributor which 
allocate task to be fairly
URL: https://github.com/apache/incubator-doris/pull/333#discussion_r235382208
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/routineload/RoutineLoad.java
 ##########
 @@ -251,6 +355,31 @@ public void updateRoutineLoadJobState(RoutineLoadJob 
routineLoadJob, RoutineLoad
         }
     }
 
+    public void processTimeOutTasks() {
+        List<RoutineLoadTaskInfo> runningTasks = new 
ArrayList<>(idToRoutineLoadTask.values());
+        runningTasks.removeAll(needSchedulerRoutineLoadTask);
+
+        for (RoutineLoadTaskInfo routineLoadTaskInfo : runningTasks) {
+            routineLoadTaskInfo.writeLock();
 
 Review comment:
   In the logical, every task only can process one function, either 
`processTimeOutTask` or `commit task`. So it really need a segment lock for 
`idToRoutineLoadTask`. According to the lot of time of `commit task`, I will 
use one lock instead of per task per lock.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to