fix: [2.4] Skip l0 segments when syncing segments to datanodes (#34389)

Cherry-pick from master
pr: #34388
See also #34387

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/34425/head
congqixia 2024-07-04 18:02:14 +08:00 committed by GitHub
parent a57c9e61fc
commit b402485292
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ func (sss *SyncSegmentsScheduler) SyncSegments(collectionID, partitionID int64,
// upon receiving the SyncSegments request, the datanode's segment state may have already transitioned from Growing/Flushing // upon receiving the SyncSegments request, the datanode's segment state may have already transitioned from Growing/Flushing
// to Flushed, so the view must include this segment. // to Flushed, so the view must include this segment.
segments := sss.meta.SelectSegments(WithChannel(channelName), SegmentFilterFunc(func(info *SegmentInfo) bool { segments := sss.meta.SelectSegments(WithChannel(channelName), SegmentFilterFunc(func(info *SegmentInfo) bool {
return info.GetPartitionID() == partitionID && isSegmentHealthy(info) return info.GetPartitionID() == partitionID && info.GetLevel() != datapb.SegmentLevel_L0 && isSegmentHealthy(info)
})) }))
req := &datapb.SyncSegmentsRequest{ req := &datapb.SyncSegmentsRequest{
ChannelName: channelName, ChannelName: channelName,