From 2fad5b34f7d3cf44cf0436ae7f1f31fabf17b6a0 Mon Sep 17 00:00:00 2001 From: "yihao.dai" Date: Fri, 7 Nov 2025 10:17:33 +0800 Subject: [PATCH] fix: Fix data race in replicate stream client (#45346) issue: https://github.com/milvus-io/milvus/issues/44123 Signed-off-by: bigsheeper --- .../replicatestream/replicate_stream_client_impl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cdc/replication/replicatestream/replicate_stream_client_impl.go b/internal/cdc/replication/replicatestream/replicate_stream_client_impl.go index 0946d4a09d..faec10be3f 100644 --- a/internal/cdc/replication/replicatestream/replicate_stream_client_impl.go +++ b/internal/cdc/replication/replicatestream/replicate_stream_client_impl.go @@ -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()