mirror of https://github.com/milvus-io/milvus.git
Small candidate compaction should only happen with >1 segments (#21250)
/kind improvement Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com> Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>pull/21274/head
parent
ae5259caa3
commit
7e85971a58
|
@ -283,6 +283,7 @@ dataCoord:
|
|||
# (smallProportion * segment max # of rows).
|
||||
compactableProportion: 0.5 # A compaction will happen on small segments if the segment after compaction will have
|
||||
# over (compactableProportion * segment max # of rows) rows.
|
||||
# MUST BE GREATER THAN OR EQUAL TO <smallProportion>!!!
|
||||
|
||||
compaction:
|
||||
enableAutoCompaction: true
|
||||
|
|
|
@ -535,7 +535,9 @@ func (t *compactionTrigger) generatePlans(segments []*SegmentInfo, force bool, i
|
|||
targetRow += s.GetNumOfRows()
|
||||
}
|
||||
// only merge if candidate number is large than MinSegmentToMerge or if target row is large enough
|
||||
if len(bucket) >= Params.DataCoordCfg.MinSegmentToMerge || targetRow > int64(float64(segment.GetMaxRowNum())*Params.DataCoordCfg.SegmentCompactableProportion) {
|
||||
if len(bucket) >= Params.DataCoordCfg.MinSegmentToMerge ||
|
||||
len(bucket) > 1 &&
|
||||
targetRow > int64(float64(segment.GetMaxRowNum())*Params.DataCoordCfg.SegmentCompactableProportion) {
|
||||
plan := segmentsToPlan(bucket, compactTime)
|
||||
log.Info("generate a plan for small candidates", zap.Any("plan", plan),
|
||||
zap.Int64("target segment row", targetRow), zap.Int64("target segment size", size))
|
||||
|
|
Loading…
Reference in New Issue