fix: [2.4] Ref collection meta when load l0 segment meta only (#37179)

Cherry pick from master
pr: #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>
pull/37198/head
congqixia 2024-10-28 14:07:30 +08:00 committed by GitHub
parent 9d37ade24f
commit 223badc482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -416,6 +416,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
}