fix: dead lock if query node crash during shard client init (#37354)

issue: #37115

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/37435/head
wei liu 2024-11-05 10:46:32 +08:00 committed by GitHub
parent 28fd217e27
commit eb712f0db9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ func (n *shardClient) getClient(ctx context.Context) (types.QueryNodeClient, err
n.Lock()
if !n.initialized.Load() {
if err := n.initClients(); err != nil {
n.Unlock()
return nil, err
}
n.initialized.Store(true)