fix: collection not `Unref` in local worker release (#28590)

See also #28589

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/28383/head
congqixia 2023-11-21 20:20:24 +08:00 committed by GitHub
parent efe3fe7b2e
commit faf38ed8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -80,9 +80,13 @@ func (w *LocalWorker) ReleaseSegments(ctx context.Context, req *querypb.ReleaseS
zap.String("scope", req.GetScope().String()),
)
log.Info("start to release segments")
sealedCount := 0
for _, id := range req.GetSegmentIDs() {
w.node.manager.Segment.Remove(id, req.GetScope())
_, count := w.node.manager.Segment.Remove(id, req.GetScope())
sealedCount += count
}
w.node.manager.Collection.Unref(req.GetCollectionID(), uint32(sealedCount))
return nil
}