mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
Add retry on getChannelLatestMsgID (#24520)
Signed-off-by: wayblink <anyang.wang@zilliz.com>
This commit is contained in:
parent
421d29c99b
commit
9d2cc8e358
@ -1138,7 +1138,13 @@ 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: &commonpb.Status{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user