fix: proxy ctx cancel before revoking session (#31596)

issue: #31219

Signed-off-by: jaime <yun.zhang@zilliz.com>
pull/31616/head
jaime 2024-03-26 14:25:07 +08:00 committed by GitHub
parent 659ad81ab7
commit 248c923e59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -426,8 +426,6 @@ func (node *Proxy) Start() error {
// Stop stops a proxy node.
func (node *Proxy) Stop() error {
node.cancel()
if node.rowIDAllocator != nil {
node.rowIDAllocator.Close()
log.Info("close id allocator", zap.String("role", typeutil.ProxyRole))
@ -451,8 +449,6 @@ func (node *Proxy) Stop() error {
log.Info("close channels time ticker", zap.String("role", typeutil.ProxyRole))
}
node.wg.Wait()
for _, cb := range node.closeCallbacks {
cb()
}
@ -477,6 +473,9 @@ func (node *Proxy) Stop() error {
node.resourceManager.Close()
}
node.cancel()
node.wg.Wait()
// https://github.com/milvus-io/milvus/issues/12282
node.UpdateStateCode(commonpb.StateCode_Abnormal)