mirror of https://github.com/milvus-io/milvus.git
Add log in AddImportSegment.getChannelLatestMsgID (#23480)
Signed-off-by: wayblink <anyang.wang@zilliz.com>pull/23568/head
parent
717f712062
commit
b23723535c
|
@ -432,6 +432,7 @@ func (dsService *dataSyncService) getChannelLatestMsgID(ctx context.Context, cha
|
|||
dmlStream.AsConsumer([]string{pChannelName}, subName, mqwrapper.SubscriptionPositionUnknown)
|
||||
id, err := dmlStream.GetLatestMsgID(pChannelName)
|
||||
if err != nil {
|
||||
log.Error("fail to GetLatestMsgID", zap.String("pChannelName", pChannelName), zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
return id.Serialize(), nil
|
||||
|
|
|
@ -560,7 +560,8 @@ func (node *DataNode) AddImportSegment(ctx context.Context, req *datapb.AddImpor
|
|||
posID, err := ds.getChannelLatestMsgID(context.Background(), req.GetChannelName(), req.GetSegmentId())
|
||||
if err != nil {
|
||||
return &datapb.AddImportSegmentResponse{
|
||||
Status: merr.Status(merr.WrapErrChannelNotFound(req.ChannelName, "failed to get channel position")),
|
||||
Status: merr.Status(merr.WrapErrChannelNotFound(
|
||||
req.ChannelName, "failed to get channel position", err.Error())),
|
||||
}, nil
|
||||
}
|
||||
// Add the new segment to the channel.
|
||||
|
|
Loading…
Reference in New Issue