mirror of https://github.com/milvus-io/milvus.git
Small candidate compaction should only happen with >1 segments (#21249)
/kind improvement Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com> Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>pull/21142/head
parent
ee7fddb6d9
commit
ef3fcdf65b
|
@ -287,6 +287,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>!!!
|
||||
expansionRate: 1.25 # During compaction, the size of segment # of rows is able to exceed segment max # of rows by (expansionRate-1) * 100%.
|
||||
|
||||
compaction:
|
||||
|
|
|
@ -613,7 +613,8 @@ func (t *compactionTrigger) generatePlans(segments []*SegmentInfo, force bool, i
|
|||
}
|
||||
// only merge if candidate number is large than MinSegmentToMerge or if target row is large enough
|
||||
if len(bucket) >= Params.DataCoordCfg.MinSegmentToMerge.GetAsInt() ||
|
||||
targetRow > int64(float64(segment.GetMaxRowNum())*Params.DataCoordCfg.SegmentCompactableProportion.GetAsFloat()) {
|
||||
len(bucket) > 1 &&
|
||||
targetRow > int64(float64(segment.GetMaxRowNum())*Params.DataCoordCfg.SegmentCompactableProportion.GetAsFloat()) {
|
||||
plan := segmentsToPlan(bucket, compactTime)
|
||||
log.Info("generate a plan for small candidates",
|
||||
zap.Int64s("plan segment IDs", lo.Map(bucket, getSegmentIDs)),
|
||||
|
|
Loading…
Reference in New Issue