mirror of https://github.com/milvus-io/milvus.git
Fix QueryNode may report succeeded to unsubscribe channel early (#23580)
Signed-off-by: yah01 <yang.cen@zilliz.com>pull/23586/head
parent
5bda7ca641
commit
71364056f9
|
@ -322,14 +322,16 @@ func (node *QueryNode) UnsubDmChannel(ctx context.Context, req *querypb.UnsubDmC
|
|||
return status, nil
|
||||
}
|
||||
|
||||
delegator, loaded := node.delegators.GetAndRemove(req.GetChannelName())
|
||||
if loaded {
|
||||
delegator, ok := node.delegators.Get(req.GetChannelName())
|
||||
if ok {
|
||||
// close the delegator first to block all coming query/search requests
|
||||
delegator.Close()
|
||||
}
|
||||
|
||||
node.pipelineManager.Remove(req.GetChannelName())
|
||||
node.manager.Segment.RemoveBy(segments.WithChannel(req.GetChannelName()))
|
||||
node.tSafeManager.Remove(req.GetChannelName())
|
||||
node.pipelineManager.Remove(req.GetChannelName())
|
||||
node.manager.Segment.RemoveBy(segments.WithChannel(req.GetChannelName()))
|
||||
node.tSafeManager.Remove(req.GetChannelName())
|
||||
node.delegators.GetAndRemove(req.GetChannelName())
|
||||
}
|
||||
|
||||
log.Info("unsubscribed channel")
|
||||
|
||||
|
|
Loading…
Reference in New Issue