diff --git a/internal/datanode/data_sync_service.go b/internal/datanode/data_sync_service.go index f8f3b9268e..588a032274 100644 --- a/internal/datanode/data_sync_service.go +++ b/internal/datanode/data_sync_service.go @@ -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 diff --git a/internal/datanode/services.go b/internal/datanode/services.go index f10f9c4248..36fa6720a4 100644 --- a/internal/datanode/services.go +++ b/internal/datanode/services.go @@ -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.