enhance: Fill start pos & level for growing segment (#36888)

Start position & level info is missing for growing segment loaded in
watch dml channel operation.

Level is important for metrics and start position is crucial for growing
exclude logic.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/36912/head
congqixia 2024-10-16 14:03:31 +08:00 committed by GitHub
parent 44d80c1355
commit caeab0cc1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,7 @@ func loadGrowingSegments(ctx context.Context, delegator delegator.ShardDelegator
if len(segmentInfo.GetBinlogs()) > 0 {
growingSegments = append(growingSegments, &querypb.SegmentLoadInfo{
SegmentID: segmentInfo.ID,
Level: segmentInfo.GetLevel(),
PartitionID: segmentInfo.PartitionID,
CollectionID: segmentInfo.CollectionID,
BinlogPaths: segmentInfo.Binlogs,
@ -104,6 +105,7 @@ func loadGrowingSegments(ctx context.Context, delegator delegator.ShardDelegator
Deltalogs: segmentInfo.Deltalogs,
Bm25Logs: segmentInfo.Bm25Statslogs,
InsertChannel: segmentInfo.InsertChannel,
StartPosition: segmentInfo.GetStartPosition(),
})
} else {
log.Info("skip segment which binlog is empty", zap.Int64("segmentID", segmentInfo.ID))