mirror of https://github.com/milvus-io/milvus.git
Close the no-use chan in the querycoord node (#20385)
Signed-off-by: SimFG <bang.fu@zilliz.com> Signed-off-by: SimFG <bang.fu@zilliz.com>pull/20540/head
parent
3d25a8dc03
commit
6e9820441f
|
@ -79,6 +79,9 @@ func (scheduler *Scheduler) schedule(ctx context.Context) {
|
|||
|
||||
case <-scheduler.stopCh:
|
||||
log.Info("JobManager stopped")
|
||||
for _, queue := range scheduler.queues {
|
||||
close(queue)
|
||||
}
|
||||
return
|
||||
|
||||
case job := <-scheduler.waitQueue:
|
||||
|
@ -96,6 +99,7 @@ func (scheduler *Scheduler) schedule(ctx context.Context) {
|
|||
scheduler.startProcessor(collection, queue)
|
||||
} else {
|
||||
// Release resource if no job for the collection
|
||||
close(queue)
|
||||
delete(scheduler.queues, collection)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue