Release last version after expiration (#20137)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2022-10-27 19:15:32 +08:00 committed by GitHub
parent 729e9d48fe
commit 1e590d787f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}()
})