diff --git a/configs/embedded-milvus.yaml b/configs/embedded-milvus.yaml index d2b3c0ecbb..d9c60ac95e 100644 --- a/configs/embedded-milvus.yaml +++ b/configs/embedded-milvus.yaml @@ -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 diff --git a/configs/milvus.yaml b/configs/milvus.yaml index e76508f175..a50fc8276f 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -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 diff --git a/internal/util/paramtable/component_param.go b/internal/util/paramtable/component_param.go index 94f42b6134..1a00b1e39c 100644 --- a/internal/util/paramtable/component_param.go +++ b/internal/util/paramtable/component_param.go @@ -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() { diff --git a/internal/util/paramtable/component_param_test.go b/internal/util/paramtable/component_param_test.go index d3b7c384e5..68b7b10b67 100644 --- a/internal/util/paramtable/component_param_test.go +++ b/internal/util/paramtable/component_param_test.go @@ -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) {