mirror of https://github.com/milvus-io/milvus.git
fix: collection not `Unref` in local worker release (#28590)
See also #28589 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/28383/head
parent
efe3fe7b2e
commit
faf38ed8dd
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue