mirror of https://github.com/milvus-io/milvus.git
enhance: Select L2 segments in L0Compaction as well (#32991)
/kind improvement Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/32855/head
parent
33bd6eed28
commit
017fd7bc25
|
@ -322,7 +322,6 @@ func (c *compactionPlanHandler) RefreshPlan(task *compactionTask) error {
|
||||||
|
|
||||||
// Select sealed L1 segments for LevelZero compaction that meets the condition:
|
// Select sealed L1 segments for LevelZero compaction that meets the condition:
|
||||||
// dmlPos < triggerInfo.pos
|
// dmlPos < triggerInfo.pos
|
||||||
// TODO: select L2 segments too
|
|
||||||
sealedSegments := c.meta.SelectSegments(WithCollection(task.triggerInfo.collectionID), SegmentFilterFunc(func(info *SegmentInfo) bool {
|
sealedSegments := c.meta.SelectSegments(WithCollection(task.triggerInfo.collectionID), SegmentFilterFunc(func(info *SegmentInfo) bool {
|
||||||
return (task.triggerInfo.partitionID == -1 || info.GetPartitionID() == task.triggerInfo.partitionID) &&
|
return (task.triggerInfo.partitionID == -1 || info.GetPartitionID() == task.triggerInfo.partitionID) &&
|
||||||
info.GetInsertChannel() == plan.GetChannel() &&
|
info.GetInsertChannel() == plan.GetChannel() &&
|
||||||
|
@ -339,7 +338,7 @@ func (c *compactionPlanHandler) RefreshPlan(task *compactionTask) error {
|
||||||
sealedSegBinlogs := lo.Map(sealedSegments, func(info *SegmentInfo, _ int) *datapb.CompactionSegmentBinlogs {
|
sealedSegBinlogs := lo.Map(sealedSegments, func(info *SegmentInfo, _ int) *datapb.CompactionSegmentBinlogs {
|
||||||
return &datapb.CompactionSegmentBinlogs{
|
return &datapb.CompactionSegmentBinlogs{
|
||||||
SegmentID: info.GetID(),
|
SegmentID: info.GetID(),
|
||||||
Level: datapb.SegmentLevel_L1,
|
Level: info.GetLevel(),
|
||||||
CollectionID: info.GetCollectionID(),
|
CollectionID: info.GetCollectionID(),
|
||||||
PartitionID: info.GetPartitionID(),
|
PartitionID: info.GetPartitionID(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue