Merge pull request #19563 from zexi/automated-cherry-pick-of-#19561-upstream-release-3.11

Automated cherry pick of #19561: fix(scheduler): unsued key
This commit is contained in:
Zexi Li
2024-02-28 11:00:15 +08:00
committed by GitHub
+2 -3
View File
@@ -231,14 +231,13 @@ func (teqm *TaskExecutorQueueManager) GetQueue(schedType string) *TaskExecutorQu
defer teqm.lock.Unlock()
var (
key string
taskExecutorQueue *TaskExecutorQueue
ok bool
)
if taskExecutorQueue, ok = teqm.taskExecutorMap[key]; !ok {
if taskExecutorQueue, ok = teqm.taskExecutorMap[schedType]; !ok {
taskExecutorQueue = NewTaskExecutorQueue(schedType, teqm.stopCh)
teqm.taskExecutorMap[key] = taskExecutorQueue
teqm.taskExecutorMap[schedType] = taskExecutorQueue
}
return taskExecutorQueue