mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
enhance: Enable to merge sort one segment (#45652)
Remove the log stack when setting isCompacting Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This commit is contained in:
parent
c8073eb90b
commit
40fdf1e828
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user