Skip to content

Commit

Permalink
enhance: Select L2 segments in L0Compaction as well (#32991)
Browse files Browse the repository at this point in the history
/kind improvement

Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper committed May 21, 2024
1 parent 33bd6ee commit 017fd7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/datacoord/compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ func (c *compactionPlanHandler) RefreshPlan(task *compactionTask) error {

// Select sealed L1 segments for LevelZero compaction that meets the condition:
// dmlPos < triggerInfo.pos
// TODO: select L2 segments too
sealedSegments := c.meta.SelectSegments(WithCollection(task.triggerInfo.collectionID), SegmentFilterFunc(func(info *SegmentInfo) bool {
return (task.triggerInfo.partitionID == -1 || info.GetPartitionID() == task.triggerInfo.partitionID) &&
info.GetInsertChannel() == plan.GetChannel() &&
Expand All @@ -339,7 +338,7 @@ func (c *compactionPlanHandler) RefreshPlan(task *compactionTask) error {
sealedSegBinlogs := lo.Map(sealedSegments, func(info *SegmentInfo, _ int) *datapb.CompactionSegmentBinlogs {
return &datapb.CompactionSegmentBinlogs{
SegmentID: info.GetID(),
Level: datapb.SegmentLevel_L1,
Level: info.GetLevel(),
CollectionID: info.GetCollectionID(),
PartitionID: info.GetPartitionID(),
}
Expand Down

0 comments on commit 017fd7b

Please sign in to comment.