mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Add retry on getChannelLatestMsgID (#24518)
Signed-off-by: wayblink <anyang.wang@zilliz.com>
This commit is contained in:
parent
39d31f8bbf
commit
5958b42941
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user