[perf](routine-load) reduce waiting in task scheduler to accelerate consume (#33756)
This commit is contained in:
committed by
yiguolei
parent
cb2598e814
commit
d79c532229
@ -101,12 +101,6 @@ public class RoutineLoadTaskScheduler extends MasterDaemon {
|
||||
try {
|
||||
// This step will be blocked when queue is empty
|
||||
RoutineLoadTaskInfo routineLoadTaskInfo = needScheduleTasksQueue.take();
|
||||
if (System.currentTimeMillis() - routineLoadTaskInfo.getLastScheduledTime()
|
||||
< routineLoadTaskInfo.getTimeoutMs()) {
|
||||
// try to delay scheduling this task for 'timeout', to void too many failure
|
||||
needScheduleTasksQueue.addLast(routineLoadTaskInfo);
|
||||
return;
|
||||
}
|
||||
scheduleOneTask(routineLoadTaskInfo);
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Taking routine load task from queue has been interrupted", e);
|
||||
@ -114,7 +108,6 @@ public class RoutineLoadTaskScheduler extends MasterDaemon {
|
||||
}
|
||||
|
||||
private void scheduleOneTask(RoutineLoadTaskInfo routineLoadTaskInfo) throws Exception {
|
||||
routineLoadTaskInfo.setLastScheduledTime(System.currentTimeMillis());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("schedule routine load task info {} for job {}",
|
||||
routineLoadTaskInfo.id, routineLoadTaskInfo.getJobId());
|
||||
|
||||
Reference in New Issue
Block a user