Fix lifetime race in indexnode (#22645)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/22557/head
congqixia 2023-03-09 16:19:52 +08:00 committed by GitHub
parent 7b71c69516
commit 9e17e2660e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -223,10 +223,10 @@ func (i *IndexNode) Stop() error {
} else {
i.waitTaskFinish()
}
i.lifetime.Wait()
// https://github.com/milvus-io/milvus/issues/12282
i.UpdateStateCode(commonpb.StateCode_Abnormal)
i.lifetime.Wait()
log.Info("Index node abnormal")
// cleanup all running tasks
deletedTasks := i.deleteAllTasks()