Fix segment leaked if task canceled (#26685)

Signed-off-by: yah01 <yah2er0ne@outlook.com>
pull/26710/head
yah01 2023-08-30 14:17:03 +08:00 committed by GitHub
parent 7d5a4b2994
commit bfcc691129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -234,6 +234,8 @@ func (loader *segmentLoader) Load(ctx context.Context,
// Wait for all segments loaded
if err := loader.waitSegmentLoadDone(ctx, segmentType, lo.Map(segments, func(info *querypb.SegmentLoadInfo, _ int) int64 { return info.GetSegmentID() })...); err != nil {
clearAll()
log.Warn("failed to wait the filtered out segments load done", zap.Error(err))
return nil, err
}