mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix consume growing from dml after release (#25421)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
aaac1e27d1
commit
cc730c1ee5
@ -610,6 +610,21 @@ func (node *QueryNode) ReleaseSegments(ctx context.Context, req *querypb.Release
|
||||
return util.WrapStatus(commonpb.ErrorCode_UnexpectedError, msg), nil
|
||||
}
|
||||
|
||||
// when we try to release a segment, add it to pipeline's exclude list first
|
||||
// in case of consumed it's growing segment again
|
||||
pipeline := node.pipelineManager.Get(req.GetShard())
|
||||
if pipeline != nil {
|
||||
droppedInfos := lo.Map(req.GetSegmentIDs(), func(id int64, _ int) *datapb.SegmentInfo {
|
||||
return &datapb.SegmentInfo{
|
||||
ID: id,
|
||||
DmlPosition: &msgpb.MsgPosition{
|
||||
Timestamp: typeutil.MaxTimestamp,
|
||||
},
|
||||
}
|
||||
})
|
||||
pipeline.ExcludedSegments(droppedInfos...)
|
||||
}
|
||||
|
||||
req.NeedTransfer = false
|
||||
err := delegator.ReleaseSegments(ctx, req, false)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user