fix: Ref collection meta when load l0 segment meta only (#37178)

Related to #37177

Previous PR #37160

Collection meta is not ref-ed when loading l0 segment in `RemoteLoad`
policy, which cause collection meta release when lots of l0 segment
released.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2024-10-28 15:49:38 +08:00 committed by GitHub
parent 33b0b8df80
commit f87acdf2a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -435,6 +435,7 @@ func (sd *shardDelegator) LoadSegments(ctx context.Context, req *querypb.LoadSeg
if err != nil {
return err
}
sd.collection.Ref(1)
sd.segmentManager.Put(ctx, segments.SegmentTypeSealed, l0Seg)
return nil
}