未验证 提交 68d38513 编写于 作者: C congqixia 提交者: GitHub

Fix: Miss channel info when load growing segment (#17789) (#17797)

Signed-off-by: Nzhagnlu <lu.zhang@zilliz.com>
Co-authored-by: Nzhagnlu <lu.zhang@zilliz.com>
Signed-off-by: NCongqi Xia <congqi.xia@zilliz.com>
Co-authored-by: Nzhagnlu <1542303831@qq.com>
Co-authored-by: Nzhagnlu <lu.zhang@zilliz.com>
上级 b097b998
...@@ -120,6 +120,7 @@ func (loader *segmentLoader) LoadSegment(req *querypb.LoadSegmentsRequest, segme ...@@ -120,6 +120,7 @@ func (loader *segmentLoader) LoadSegment(req *querypb.LoadSegmentsRequest, segme
segmentID := info.SegmentID segmentID := info.SegmentID
partitionID := info.PartitionID partitionID := info.PartitionID
collectionID := info.CollectionID collectionID := info.CollectionID
vChannelID := info.InsertChannel
collection, err := loader.metaReplica.getCollectionByID(collectionID) collection, err := loader.metaReplica.getCollectionByID(collectionID)
if err != nil { if err != nil {
...@@ -127,7 +128,7 @@ func (loader *segmentLoader) LoadSegment(req *querypb.LoadSegmentsRequest, segme ...@@ -127,7 +128,7 @@ func (loader *segmentLoader) LoadSegment(req *querypb.LoadSegmentsRequest, segme
return err return err
} }
segment, err := newSegment(collection, segmentID, partitionID, collectionID, "", segmentType) segment, err := newSegment(collection, segmentID, partitionID, collectionID, vChannelID, segmentType)
if err != nil { if err != nil {
log.Error("load segment failed when create new segment", log.Error("load segment failed when create new segment",
zap.Int64("collectionID", collectionID), zap.Int64("collectionID", collectionID),
......
...@@ -177,13 +177,14 @@ func (w *watchDmChannelsTask) Execute(ctx context.Context) (err error) { ...@@ -177,13 +177,14 @@ func (w *watchDmChannelsTask) Execute(ctx context.Context) (err error) {
ufInfo := w.req.SegmentInfos[ufInfoID] ufInfo := w.req.SegmentInfos[ufInfoID]
if len(ufInfo.Binlogs) > 0 { if len(ufInfo.Binlogs) > 0 {
unFlushedSegments = append(unFlushedSegments, &queryPb.SegmentLoadInfo{ unFlushedSegments = append(unFlushedSegments, &queryPb.SegmentLoadInfo{
SegmentID: ufInfo.ID, SegmentID: ufInfo.ID,
PartitionID: ufInfo.PartitionID, PartitionID: ufInfo.PartitionID,
CollectionID: ufInfo.CollectionID, CollectionID: ufInfo.CollectionID,
BinlogPaths: ufInfo.Binlogs, BinlogPaths: ufInfo.Binlogs,
NumOfRows: ufInfo.NumOfRows, NumOfRows: ufInfo.NumOfRows,
Statslogs: ufInfo.Statslogs, Statslogs: ufInfo.Statslogs,
Deltalogs: ufInfo.Deltalogs, Deltalogs: ufInfo.Deltalogs,
InsertChannel: ufInfo.InsertChannel,
}) })
unFlushedSegmentIDs = append(unFlushedSegmentIDs, ufInfo.ID) unFlushedSegmentIDs = append(unFlushedSegmentIDs, ufInfo.ID)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册