mirror of https://github.com/milvus-io/milvus.git
Fix memory & goroutine leak (#20152)
Signed-off-by: yah01 <yang.cen@zilliz.com> Signed-off-by: yah01 <yang.cen@zilliz.com>pull/20174/head
parent
89541a6f68
commit
8bfa55e560
|
@ -115,6 +115,7 @@ func (controller *CheckerController) check(ctx context.Context) {
|
|||
for _, task := range tasks {
|
||||
err := controller.scheduler.Add(task)
|
||||
if err != nil {
|
||||
task.Cancel()
|
||||
continue
|
||||
}
|
||||
added++
|
||||
|
|
|
@ -125,6 +125,7 @@ func (s *Server) balanceSegments(ctx context.Context, req *querypb.LoadBalanceRe
|
|||
)
|
||||
err := s.taskScheduler.Add(task)
|
||||
if err != nil {
|
||||
task.Cancel()
|
||||
return err
|
||||
}
|
||||
tasks = append(tasks, task)
|
||||
|
|
Loading…
Reference in New Issue