From 1e590d787fb48b1b9ab596847acd1a6f2d525f58 Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 27 Oct 2022 19:15:32 +0800 Subject: [PATCH] Release last version after expiration (#20137) Signed-off-by: Congqi Xia Signed-off-by: Congqi Xia --- internal/querynode/shard_cluster_version.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/querynode/shard_cluster_version.go b/internal/querynode/shard_cluster_version.go index 0cded83e3a..f76930cf66 100644 --- a/internal/querynode/shard_cluster_version.go +++ b/internal/querynode/shard_cluster_version.go @@ -117,6 +117,8 @@ func (v *ShardClusterVersion) checkSafeGC() { if v.lastVersion != nil { <-v.lastVersion.Expire() } + // release the reference of last version, so it could be processed by gc + v.lastVersion = nil close(v.ch) }() })