From 248c923e59cac6dd4ff8178866cf9d34081d2425 Mon Sep 17 00:00:00 2001 From: jaime Date: Tue, 26 Mar 2024 14:25:07 +0800 Subject: [PATCH] fix: proxy ctx cancel before revoking session (#31596) issue: #31219 Signed-off-by: jaime --- internal/proxy/proxy.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/proxy/proxy.go b/internal/proxy/proxy.go index 9c240c731f..aa18485337 100644 --- a/internal/proxy/proxy.go +++ b/internal/proxy/proxy.go @@ -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)