mirror of https://github.com/milvus-io/milvus.git
parent
3d1f7a88a7
commit
38f9ea5122
|
@ -281,7 +281,7 @@ dataCoord:
|
|||
minSizeFromIdleToSealed: 16 # The min size in MB of segment which can be idle from sealed.
|
||||
smallProportion: 0.5 # The segment is considered as "small segment" when its # of rows is smaller than
|
||||
# (smallProportion * segment max # of rows).
|
||||
compactableProportion: 0.5 # A compaction will happen on small segments if the segment after compaction will have
|
||||
compactableProportion: 0.85 # 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>!!!
|
||||
|
||||
|
|
|
@ -1255,8 +1255,7 @@ func (p *dataCoordConfig) init(base *BaseTable) {
|
|||
|
||||
p.initCompactionMinSegment()
|
||||
p.initCompactionMaxSegment()
|
||||
p.initSegmentSmallProportion()
|
||||
p.initSegmentCompactableProportion()
|
||||
p.initSegmentProportion()
|
||||
p.initCompactionTimeoutInSeconds()
|
||||
p.initCompactionCheckIntervalInSeconds()
|
||||
p.initSingleCompactionRatioThreshold()
|
||||
|
@ -1333,7 +1332,17 @@ func (p *dataCoordConfig) initSegmentSmallProportion() {
|
|||
}
|
||||
|
||||
func (p *dataCoordConfig) initSegmentCompactableProportion() {
|
||||
p.SegmentCompactableProportion = p.Base.ParseFloatWithDefault("dataCoord.segment.compactableProportion", 0.5)
|
||||
p.SegmentCompactableProportion = p.Base.ParseFloatWithDefault("dataCoord.segment.compactableProportion", 0.85)
|
||||
}
|
||||
|
||||
func (p *dataCoordConfig) initSegmentProportion() {
|
||||
p.initSegmentSmallProportion()
|
||||
p.initSegmentCompactableProportion()
|
||||
|
||||
// avoid invalid single compaction
|
||||
if p.SegmentCompactableProportion < p.SegmentSmallProportion {
|
||||
p.SegmentCompactableProportion = p.SegmentSmallProportion
|
||||
}
|
||||
}
|
||||
|
||||
// compaction execution timeout
|
||||
|
|
|
@ -290,6 +290,7 @@ func TestComponentParam(t *testing.T) {
|
|||
assert.Equal(t, 24*60*60*time.Second, Params.SegmentMaxLifetime)
|
||||
assert.True(t, Params.EnableGarbageCollection)
|
||||
assert.Equal(t, Params.EnableActiveStandby, false)
|
||||
assert.True(t, Params.SegmentCompactableProportion >= Params.SegmentSmallProportion)
|
||||
t.Logf("dataCoord EnableActiveStandby = %t", Params.EnableActiveStandby)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue