Set EnableGarbageCollection to true by default (#18305)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/18314/head
congqixia 2022-07-18 16:34:28 +08:00 committed by GitHub
parent c97563590c
commit f7bd054adb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View File

@ -206,7 +206,7 @@ dataCoord:
clientMaxRecvSize: 104857600 # 100 MB, 100 * 1024 * 1024
clientMaxSendSize: 104857600 # 100 MB, 100 * 1024 * 1024
enableCompaction: true # Enable data segment compression
enableGarbageCollection: false
enableGarbageCollection: true
segment:
maxSize: 512 # Maximum size of a segment in MB

View File

@ -211,7 +211,7 @@ dataCoord:
address: localhost
port: 13333
enableCompaction: true # Enable data segment compression
enableGarbageCollection: false
enableGarbageCollection: true
segment:
maxSize: 512 # Maximum size of a segment in MB

View File

@ -1045,7 +1045,7 @@ func (p *dataCoordConfig) initGlobalCompactionInterval() {
// -- GC --
func (p *dataCoordConfig) initEnableGarbageCollection() {
p.EnableGarbageCollection = p.Base.ParseBool("dataCoord.enableGarbageCollection", false)
p.EnableGarbageCollection = p.Base.ParseBool("dataCoord.enableGarbageCollection", true)
}
func (p *dataCoordConfig) initGCInterval() {

View File

@ -278,6 +278,8 @@ func TestComponentParam(t *testing.T) {
t.Run("test dataCoordConfig", func(t *testing.T) {
Params := CParams.DataCoordCfg
assert.Equal(t, 24*60*60*time.Second, Params.SegmentMaxLifetime)
assert.True(t, Params.EnableGarbageCollection)
})
t.Run("test dataNodeConfig", func(t *testing.T) {