diff --git a/internal/datanode/compactor/mix_compactor.go b/internal/datanode/compactor/mix_compactor.go index 18dc5b6f64..98a50614d8 100644 --- a/internal/datanode/compactor/mix_compactor.go +++ b/internal/datanode/compactor/mix_compactor.go @@ -355,8 +355,8 @@ func (t *mixCompactionTask) Compact() (*datapb.CompactionPlanResult, error) { break } } - if len(t.plan.GetSegmentBinlogs()) <= 1 || - len(t.plan.GetSegmentBinlogs()) > t.compactionParams.MaxSegmentMergeSort { + + if len(t.plan.GetSegmentBinlogs()) > t.compactionParams.MaxSegmentMergeSort { // sort merge is not applicable if there is only one segment or too many segments sortMergeAppicable = false } @@ -365,7 +365,6 @@ func (t *mixCompactionTask) Compact() (*datapb.CompactionPlanResult, error) { var res []*datapb.CompactionSegment var err error if sortMergeAppicable { - // TODO: the implementation of mergeSortMultipleSegments is not correct, also see issue: https://github.com/milvus-io/milvus/issues/43034 log.Info("compact by merge sort") res, err = mergeSortMultipleSegments(ctxTimeout, t.plan, t.collectionID, t.partitionID, t.maxRows, t.binlogIO, t.plan.GetSegmentBinlogs(), t.tr, t.currentTime, t.plan.GetCollectionTtl(), t.compactionParams, t.sortByFieldIDs)