fix: [2.6] Fix data race in replicate stream client (#45347)

issue: https://github.com/milvus-io/milvus/issues/44123

pr: https://github.com/milvus-io/milvus/pull/45346

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
yihao.dai 2025-11-07 16:43:35 +08:00 committed by GitHub
parent 750af91c5a
commit 0bfb5f6012
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,11 +87,11 @@ func NewReplicateStreamClient(ctx context.Context, c cluster.MilvusClient, chann
func (r *replicateStreamClient) startInternal() {
defer func() {
r.metrics.OnClose()
close(r.finishedCh)
log.Info("replicate stream client closed",
zap.String("key", r.channel.Key),
zap.Int64("revision", r.channel.ModRevision))
r.metrics.OnClose()
close(r.finishedCh)
}()
backoff := backoff.NewExponentialBackOff()