未验证 提交 5958b429 编写于 作者: W wayblink 提交者: GitHub

Add retry on getChannelLatestMsgID (#24518)

Signed-off-by: Nwayblink <anyang.wang@zilliz.com>
上级 39d31f8b
......@@ -557,7 +557,12 @@ func (node *DataNode) AddImportSegment(ctx context.Context, req *datapb.AddImpor
}, nil
}
// Get the current dml channel position ID, that will be used in segments start positions and end positions.
posID, err := ds.getChannelLatestMsgID(context.Background(), req.GetChannelName(), req.GetSegmentId())
var posID []byte
err = retry.Do(ctx, func() error {
id, innerError := ds.getChannelLatestMsgID(context.Background(), req.GetChannelName(), req.GetSegmentId())
posID = id
return innerError
}, retry.Attempts(30))
if err != nil {
return &datapb.AddImportSegmentResponse{
Status: merr.Status(merr.WrapErrChannelNotFound(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册