From 825d6f10f3bcb07a5a291bf9db2bb7fefaa6ba15 Mon Sep 17 00:00:00 2001 From: lance6716 Date: Fri, 19 Mar 2021 14:53:59 +0800 Subject: [PATCH 1/3] master: add etcd compaction and quota config --- dm/master/config.go | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/dm/master/config.go b/dm/master/config.go index b4f122d3b9..8c917e75f6 100644 --- a/dm/master/config.go +++ b/dm/master/config.go @@ -37,11 +37,14 @@ import ( ) const ( - defaultRPCTimeout = "30s" - defaultNamePrefix = "dm-master" - defaultDataDirPrefix = "default" - defaultPeerUrls = "http://127.0.0.1:8291" - defaultInitialClusterState = embed.ClusterStateFlagNew + defaultRPCTimeout = "30s" + defaultNamePrefix = "dm-master" + defaultDataDirPrefix = "default" + defaultPeerUrls = "http://127.0.0.1:8291" + defaultInitialClusterState = embed.ClusterStateFlagNew + defaultAutoCompactionMode = "periodic" + defaultAutoCompactionRetention = "1h" + defaultQuotaBackendBytes = 2 * 1024 * 1024 * 1024 // 2GB ) var ( @@ -75,6 +78,9 @@ func NewConfig() *Config { fs.StringVar(&cfg.PeerUrls, "peer-urls", defaultPeerUrls, "URLs for peer traffic") fs.StringVar(&cfg.AdvertisePeerUrls, "advertise-peer-urls", "", `advertise URLs for peer traffic (default "${peer-urls}")`) fs.StringVar(&cfg.Join, "join", "", `join to an existing cluster (usage: cluster's "${master-addr}" list, e.g. "127.0.0.1:8261,127.0.0.1:18261"`) + fs.StringVar(&cfg.AutoCompactionMode, "auto-compaction-mode", defaultAutoCompactionMode, `etcd's auto-compaction-mode, either 'periodic' or 'revision'`) + fs.StringVar(&cfg.AutoCompactionRetention, "auto-compaction-retention", defaultAutoCompactionRetention, `etcd's auto-compaction-retention, accept values like '5h' or '5' (5 hours in 'periodic' mode or 5 revisions in 'revision')`) + fs.Int64Var(&cfg.QuotaBackendBytes, "quota-backend-bytes", defaultQuotaBackendBytes, `etcd's storage quota in bytes`) fs.StringVar(&cfg.SSLCA, "ssl-ca", "", "path of file that contains list of trusted SSL CAs for connection") fs.StringVar(&cfg.SSLCert, "ssl-cert", "", "path of file that contains X509 certificate in PEM format for connection") @@ -108,13 +114,16 @@ type Config struct { // etcd relative config items // NOTE: we use `MasterAddr` to generate `ClientUrls` and `AdvertiseClientUrls` // NOTE: more items will be add when adding leader election - Name string `toml:"name" json:"name"` - DataDir string `toml:"data-dir" json:"data-dir"` - PeerUrls string `toml:"peer-urls" json:"peer-urls"` - AdvertisePeerUrls string `toml:"advertise-peer-urls" json:"advertise-peer-urls"` - InitialCluster string `toml:"initial-cluster" json:"initial-cluster"` - InitialClusterState string `toml:"initial-cluster-state" json:"initial-cluster-state"` - Join string `toml:"join" json:"join"` // cluster's client address (endpoints), not peer address + Name string `toml:"name" json:"name"` + DataDir string `toml:"data-dir" json:"data-dir"` + PeerUrls string `toml:"peer-urls" json:"peer-urls"` + AdvertisePeerUrls string `toml:"advertise-peer-urls" json:"advertise-peer-urls"` + InitialCluster string `toml:"initial-cluster" json:"initial-cluster"` + InitialClusterState string `toml:"initial-cluster-state" json:"initial-cluster-state"` + Join string `toml:"join" json:"join"` // cluster's client address (endpoints), not peer address + AutoCompactionMode string `toml:"auto-compaction-mode" json:"auto-compaction-mode"` + AutoCompactionRetention string `toml:"auto-compaction-retention" json:"auto-compaction-retention"` + QuotaBackendBytes int64 `toml:"quota-backend-bytes" json:"quota-backend-bytes"` // directory path used to store source config files when upgrading from v1.0.x. // if this path set, DM-master leader will try to upgrade from v1.0.x to the current version. @@ -345,6 +354,9 @@ func (c *Config) genEmbedEtcdConfig(cfg *embed.Config) (*embed.Config, error) { cfg.InitialCluster = c.InitialCluster cfg.ClusterState = c.InitialClusterState + cfg.AutoCompactionMode = c.AutoCompactionMode + cfg.AutoCompactionRetention = c.AutoCompactionRetention + cfg.QuotaBackendBytes = c.QuotaBackendBytes err = cfg.Validate() // verify & trigger the builder if err != nil { From 07da40c1d04f4d854ff286cf520dc64f27972645 Mon Sep 17 00:00:00 2001 From: lance6716 Date: Sat, 20 Mar 2021 12:54:50 +0800 Subject: [PATCH 2/3] fix CI --- dm/master/config.go | 8 +++++ dm/master/config_test.go | 3 ++ dm/master/server_test.go | 40 +++++++++++++++++++++++++ tests/dmctl_basic/conf/get_master1.toml | 3 ++ 4 files changed, 54 insertions(+) diff --git a/dm/master/config.go b/dm/master/config.go index 8c917e75f6..10f7f71c88 100644 --- a/dm/master/config.go +++ b/dm/master/config.go @@ -45,6 +45,7 @@ const ( defaultAutoCompactionMode = "periodic" defaultAutoCompactionRetention = "1h" defaultQuotaBackendBytes = 2 * 1024 * 1024 * 1024 // 2GB + quotaBackendBytesLowerBound = 500 * 1024 * 1024 // 500MB ) var ( @@ -310,6 +311,13 @@ func (c *Config) adjust() error { c.Join = utils.WrapSchemes(c.Join, c.SSLCA != "") } + if c.QuotaBackendBytes < quotaBackendBytesLowerBound { + log.L().Warn("quota-backend-bytes is too low, will adjust it", + zap.Int64("from", c.QuotaBackendBytes), + zap.Int64("to", quotaBackendBytesLowerBound)) + c.QuotaBackendBytes = quotaBackendBytesLowerBound + } + return err } diff --git a/dm/master/config_test.go b/dm/master/config_test.go index 0743536c0e..7c9748de9a 100644 --- a/dm/master/config_test.go +++ b/dm/master/config_test.go @@ -191,6 +191,9 @@ func (t *testConfigSuite) TestGenEmbedEtcdConfig(c *check.C) { c.Assert(etcdCfg.APUrls, check.DeepEquals, []url.URL{{Scheme: "http", Host: "127.0.0.1:8291"}}) c.Assert(etcdCfg.InitialCluster, check.DeepEquals, fmt.Sprintf("dm-master-%s=http://127.0.0.1:8291", hostname)) c.Assert(etcdCfg.ClusterState, check.Equals, embed.ClusterStateFlagExisting) + c.Assert(etcdCfg.AutoCompactionMode, check.Equals, "periodic") + c.Assert(etcdCfg.AutoCompactionRetention, check.Equals, "1h") + c.Assert(etcdCfg.QuotaBackendBytes, check.Equals, int64(2*1024*1024*1024)) cfg2 := *cfg1 cfg2.MasterAddr = "127.0.0.1\n:8261" diff --git a/dm/master/server_test.go b/dm/master/server_test.go index b56f1d9bf0..ba7f27bf54 100644 --- a/dm/master/server_test.go +++ b/dm/master/server_test.go @@ -1770,3 +1770,43 @@ func createTableInfo(c *check.C, p *parser.Parser, se sessionctx.Context, tableI } return info } + +type testEtcd struct { +} + +var _ = check.Suite(&testEtcd{}) + +func (t *testEtcd) TestEtcdAutoCompaction(c *check.C) { + cfg := NewConfig() + c.Assert(cfg.Parse([]string{"-config=./dm-master.toml"}), check.IsNil) + + cfg.DataDir = c.MkDir() + cfg.MasterAddr = tempurl.Alloc()[len("http://"):] + cfg.AutoCompactionRetention = "1s" + + ctx, cancel := context.WithCancel(context.Background()) + s := NewServer(cfg) + c.Assert(s.Start(ctx), check.IsNil) + + etcdCli, err := clientv3.New(clientv3.Config{ + Endpoints: []string{cfg.MasterAddr}, + }) + c.Assert(err, check.IsNil) + + for i := 0; i < 100; i++ { + _, err = etcdCli.Put(ctx, "key", fmt.Sprintf("%03d", i)) + c.Assert(err, check.IsNil) + } + time.Sleep(3 * time.Second) + resp, err := etcdCli.Get(ctx, "key") + c.Assert(err, check.IsNil) + + utils.WaitSomething(10, time.Second, func() bool { + _, err = etcdCli.Get(ctx, "key", clientv3.WithRev(resp.Header.Revision-1)) + return err != nil + }) + c.Assert(err, check.ErrorMatches, ".*required revision has been compacted.*") + + cancel() + s.Close() +} diff --git a/tests/dmctl_basic/conf/get_master1.toml b/tests/dmctl_basic/conf/get_master1.toml index bc1589d944..8df893c4d1 100644 --- a/tests/dmctl_basic/conf/get_master1.toml +++ b/tests/dmctl_basic/conf/get_master1.toml @@ -15,6 +15,9 @@ advertise-peer-urls = "http://127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" initial-cluster-state = "new" join = "" +auto-compaction-mode = "periodic" +auto-compaction-retention = "1h" +quota-backend-bytes = 2147483648 v1-sources-path = "" ssl-ca = "" ssl-cert = "" From 1efba84dcc6d092aecc3a4cf4919ebd3187dd2bc Mon Sep 17 00:00:00 2001 From: lance6716 Date: Sun, 21 Mar 2021 20:35:04 +0800 Subject: [PATCH 3/3] enable a short auto-compaction-retention to check DM handling compact error --- tests/all_mode/conf/dm-master.toml | 1 + tests/dm_syncer/conf/dm-master.toml | 2 +- tests/dmctl_advance/conf/dm-master.toml | 1 + tests/dmctl_command/conf/dm-master.toml | 1 + tests/drop_column_with_index/conf/dm-master.toml | 1 + tests/full_mode/conf/dm-master.toml | 1 + tests/gtid/conf/dm-master.toml | 1 + tests/ha/conf/dm-master1.toml | 1 + tests/ha/conf/dm-master2.toml | 3 ++- tests/ha/conf/dm-master3.toml | 3 ++- tests/ha/conf/dm-master4.toml | 1 + tests/ha/conf/dm-master5.toml | 1 + tests/ha/conf/dm-master6.toml | 1 + tests/ha_cases/conf/dm-master-join1.toml | 1 + tests/ha_cases/conf/dm-master-join2.toml | 3 ++- tests/ha_cases/conf/dm-master-join3.toml | 3 ++- tests/ha_cases/conf/dm-master-join4.toml | 3 ++- tests/ha_cases/conf/dm-master-join5.toml | 3 ++- tests/ha_cases/conf/dm-master1.toml | 1 + tests/ha_cases/conf/dm-master2.toml | 3 ++- tests/ha_cases/conf/dm-master3.toml | 3 ++- tests/ha_master/conf/dm-master-join1.toml | 1 + tests/ha_master/conf/dm-master1.toml | 3 ++- tests/ha_master/conf/dm-master2.toml | 1 + tests/ha_master/conf/dm-master3.toml | 1 + tests/ha_master/conf/dm-master4.toml | 1 + tests/ha_master/conf/dm-master5.toml | 1 + tests/handle_error/conf/dm-master.toml | 1 + tests/http_apis/conf/dm-master.toml | 1 + tests/import_goroutine_leak/conf/dm-master.toml | 1 + tests/import_v10x/conf/dm-master.toml | 1 + tests/incremental_mode/conf/dm-master.toml | 1 + tests/initial_unit/conf/dm-master.toml | 1 + tests/load_interrupt/conf/dm-master.toml | 1 + tests/many_tables/conf/dm-master.toml | 1 + tests/online_ddl/conf/dm-master.toml | 1 + tests/only_dml/conf/dm-master.toml | 1 + tests/print_status/conf/dm-master.toml | 1 + tests/relay_interrupt/conf/dm-master.toml | 1 + tests/retry_cancel/conf/dm-master.toml | 1 + tests/safe_mode/conf/dm-master.toml | 1 + tests/sequence_safe_mode/conf/dm-master.toml | 1 + tests/sequence_sharding/conf/dm-master.toml | 1 + tests/sequence_sharding_optimistic/conf/dm-master.toml | 1 + tests/sequence_sharding_removemeta/conf/dm-master.toml | 1 + tests/shardddl1/conf/dm-master.toml | 1 + tests/shardddl2/conf/dm-master.toml | 1 + tests/shardddl3/conf/dm-master.toml | 1 + tests/sharding/conf/dm-master.toml | 1 + tests/sharding2/conf/dm-master.toml | 1 + tests/start_task/conf/dm-master.toml | 1 + tests/tls/conf/dm-master1.toml | 1 + tests/tls/conf/dm-master2.toml | 3 ++- tests/tls/conf/dm-master3.toml | 3 ++- tests/upstream_switch/conf/dm-master.toml | 1 + 55 files changed, 66 insertions(+), 12 deletions(-) diff --git a/tests/all_mode/conf/dm-master.toml b/tests/all_mode/conf/dm-master.toml index 9b360834d3..53a294e7d0 100644 --- a/tests/all_mode/conf/dm-master.toml +++ b/tests/all_mode/conf/dm-master.toml @@ -3,3 +3,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" rpc-timeout = "30s" +auto-compaction-retention = "3s" diff --git a/tests/dm_syncer/conf/dm-master.toml b/tests/dm_syncer/conf/dm-master.toml index bdeb27b605..7cecf59ad8 100644 --- a/tests/dm_syncer/conf/dm-master.toml +++ b/tests/dm_syncer/conf/dm-master.toml @@ -1,4 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" - +auto-compaction-retention = "3s" diff --git a/tests/dmctl_advance/conf/dm-master.toml b/tests/dmctl_advance/conf/dm-master.toml index 14ac020290..c014ffb07c 100644 --- a/tests/dmctl_advance/conf/dm-master.toml +++ b/tests/dmctl_advance/conf/dm-master.toml @@ -2,3 +2,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/dmctl_command/conf/dm-master.toml b/tests/dmctl_command/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/dmctl_command/conf/dm-master.toml +++ b/tests/dmctl_command/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/drop_column_with_index/conf/dm-master.toml b/tests/drop_column_with_index/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/drop_column_with_index/conf/dm-master.toml +++ b/tests/drop_column_with_index/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/full_mode/conf/dm-master.toml b/tests/full_mode/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/full_mode/conf/dm-master.toml +++ b/tests/full_mode/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/gtid/conf/dm-master.toml b/tests/gtid/conf/dm-master.toml index 9b360834d3..53a294e7d0 100644 --- a/tests/gtid/conf/dm-master.toml +++ b/tests/gtid/conf/dm-master.toml @@ -3,3 +3,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" rpc-timeout = "30s" +auto-compaction-retention = "3s" diff --git a/tests/ha/conf/dm-master1.toml b/tests/ha/conf/dm-master1.toml index 13eb92f3cc..78fd5845ae 100644 --- a/tests/ha/conf/dm-master1.toml +++ b/tests/ha/conf/dm-master1.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292" +auto-compaction-retention = "3s" diff --git a/tests/ha/conf/dm-master2.toml b/tests/ha/conf/dm-master2.toml index 587092d387..41344e9049 100644 --- a/tests/ha/conf/dm-master2.toml +++ b/tests/ha/conf/dm-master2.toml @@ -3,4 +3,5 @@ name = "master2" master-addr = ":8361" advertise-addr = "127.0.0.1:8361" peer-urls = "127.0.0.1:8292" -initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292" \ No newline at end of file +initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292" +auto-compaction-retention = "3s" diff --git a/tests/ha/conf/dm-master3.toml b/tests/ha/conf/dm-master3.toml index 68132a9e7b..0e2d24d983 100644 --- a/tests/ha/conf/dm-master3.toml +++ b/tests/ha/conf/dm-master3.toml @@ -3,4 +3,5 @@ name = "master3" master-addr = ":8461" advertise-addr = "127.0.0.1:8461" peer-urls = "http://127.0.0.1:8293" -join = "127.0.0.1:8261,127.0.0.1:8361" \ No newline at end of file +join = "127.0.0.1:8261,127.0.0.1:8361" +auto-compaction-retention = "3s" diff --git a/tests/ha/conf/dm-master4.toml b/tests/ha/conf/dm-master4.toml index 00ea67f196..44fc0689b5 100644 --- a/tests/ha/conf/dm-master4.toml +++ b/tests/ha/conf/dm-master4.toml @@ -4,3 +4,4 @@ master-addr = ":8561" advertise-addr = "127.0.0.1:8561" peer-urls = "http://127.0.0.1:8294" join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461" +auto-compaction-retention = "3s" diff --git a/tests/ha/conf/dm-master5.toml b/tests/ha/conf/dm-master5.toml index 9c06c40544..15e4f3c96e 100644 --- a/tests/ha/conf/dm-master5.toml +++ b/tests/ha/conf/dm-master5.toml @@ -4,3 +4,4 @@ master-addr = ":8661" advertise-addr = "127.0.0.1:8661" peer-urls = "http://127.0.0.1:8295" join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461,127.0.0.1:8561" +auto-compaction-retention = "3s" diff --git a/tests/ha/conf/dm-master6.toml b/tests/ha/conf/dm-master6.toml index 4fb0059c43..e8494af359 100644 --- a/tests/ha/conf/dm-master6.toml +++ b/tests/ha/conf/dm-master6.toml @@ -4,3 +4,4 @@ master-addr = ":8761" advertise-addr = "127.0.0.1:8761" peer-urls = "http://127.0.0.1:8296" join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461,127.0.0.1:8561,127.0.0.1:8661" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master-join1.toml b/tests/ha_cases/conf/dm-master-join1.toml index aa24d7d7d3..e700eeffa5 100644 --- a/tests/ha_cases/conf/dm-master-join1.toml +++ b/tests/ha_cases/conf/dm-master-join1.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master-join2.toml b/tests/ha_cases/conf/dm-master-join2.toml index c0fef373e5..ffc2aa6563 100644 --- a/tests/ha_cases/conf/dm-master-join2.toml +++ b/tests/ha_cases/conf/dm-master-join2.toml @@ -3,4 +3,5 @@ name = "master2" master-addr = ":8361" advertise-addr = "127.0.0.1:8361" peer-urls = "http://127.0.0.1:8292" -join = "127.0.0.1:8261" \ No newline at end of file +join = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master-join3.toml b/tests/ha_cases/conf/dm-master-join3.toml index d03e40f8c8..d187440f25 100644 --- a/tests/ha_cases/conf/dm-master-join3.toml +++ b/tests/ha_cases/conf/dm-master-join3.toml @@ -3,4 +3,5 @@ name = "master3" master-addr = ":8461" advertise-addr = "127.0.0.1:8461" peer-urls = "http://127.0.0.1:8293" -join = "127.0.0.1:8261,127.0.0.1:8361" \ No newline at end of file +join = "127.0.0.1:8261,127.0.0.1:8361" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master-join4.toml b/tests/ha_cases/conf/dm-master-join4.toml index d458a9f2b2..1067b5541a 100644 --- a/tests/ha_cases/conf/dm-master-join4.toml +++ b/tests/ha_cases/conf/dm-master-join4.toml @@ -3,4 +3,5 @@ name = "master4" master-addr = ":8561" advertise-addr = "127.0.0.1:8561" peer-urls = "http://127.0.0.1:8294" -join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461" \ No newline at end of file +join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master-join5.toml b/tests/ha_cases/conf/dm-master-join5.toml index 82c09289a9..fbe749f31d 100644 --- a/tests/ha_cases/conf/dm-master-join5.toml +++ b/tests/ha_cases/conf/dm-master-join5.toml @@ -3,4 +3,5 @@ name = "master5" master-addr = ":8661" advertise-addr = "127.0.0.1:8661" peer-urls = "http://127.0.0.1:8295" -join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461,127.0.0.1:8561" \ No newline at end of file +join = "127.0.0.1:8261,127.0.0.1:8361,127.0.0.1:8461,127.0.0.1:8561" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master1.toml b/tests/ha_cases/conf/dm-master1.toml index 491b5487df..3c6aa40c1f 100644 --- a/tests/ha_cases/conf/dm-master1.toml +++ b/tests/ha_cases/conf/dm-master1.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292,master3=http://127.0.0.1:8293" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master2.toml b/tests/ha_cases/conf/dm-master2.toml index 47c241dbc6..4edd2de4bb 100644 --- a/tests/ha_cases/conf/dm-master2.toml +++ b/tests/ha_cases/conf/dm-master2.toml @@ -3,4 +3,5 @@ name = "master2" master-addr = ":8361" advertise-addr = "127.0.0.1:8361" peer-urls = "127.0.0.1:8292" -initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292,master3=http://127.0.0.1:8293" \ No newline at end of file +initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292,master3=http://127.0.0.1:8293" +auto-compaction-retention = "3s" diff --git a/tests/ha_cases/conf/dm-master3.toml b/tests/ha_cases/conf/dm-master3.toml index 47caf87fed..40972db391 100644 --- a/tests/ha_cases/conf/dm-master3.toml +++ b/tests/ha_cases/conf/dm-master3.toml @@ -3,4 +3,5 @@ name = "master3" master-addr = ":8461" advertise-addr = "127.0.0.1:8461" peer-urls = "127.0.0.1:8293" -initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292,master3=http://127.0.0.1:8293" \ No newline at end of file +initial-cluster = "master1=http://127.0.0.1:8291,master2=http://127.0.0.1:8292,master3=http://127.0.0.1:8293" +auto-compaction-retention = "3s" diff --git a/tests/ha_master/conf/dm-master-join1.toml b/tests/ha_master/conf/dm-master-join1.toml index 986ccff55a..2e19311c12 100644 --- a/tests/ha_master/conf/dm-master-join1.toml +++ b/tests/ha_master/conf/dm-master-join1.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "localhost:8261" peer-urls = "http://localhost:8291" join = "localhost:8461,localhost:8561,localhost:8661" +auto-compaction-retention = "3s" diff --git a/tests/ha_master/conf/dm-master1.toml b/tests/ha_master/conf/dm-master1.toml index e7277abe51..b5554c2d3b 100644 --- a/tests/ha_master/conf/dm-master1.toml +++ b/tests/ha_master/conf/dm-master1.toml @@ -3,4 +3,5 @@ name = "master1" master-addr = ":8261" advertise-addr = "localhost:8261" peer-urls = "localhost:8291" -initial-cluster = "master1=http://localhost:8291,master2=http://localhost:8292,master3=http://localhost:8293,master4=http://localhost:8294,master5=http://localhost:8295" \ No newline at end of file +initial-cluster = "master1=http://localhost:8291,master2=http://localhost:8292,master3=http://localhost:8293,master4=http://localhost:8294,master5=http://localhost:8295" +auto-compaction-retention = "3s" diff --git a/tests/ha_master/conf/dm-master2.toml b/tests/ha_master/conf/dm-master2.toml index 1c48cfb521..bae72e78c7 100644 --- a/tests/ha_master/conf/dm-master2.toml +++ b/tests/ha_master/conf/dm-master2.toml @@ -4,3 +4,4 @@ master-addr = ":8361" advertise-addr = "localhost:8361" peer-urls = "localhost:8292" initial-cluster = "master1=http://localhost:8291,master2=http://localhost:8292,master3=http://localhost:8293,master4=http://localhost:8294,master5=http://localhost:8295" +auto-compaction-retention = "3s" diff --git a/tests/ha_master/conf/dm-master3.toml b/tests/ha_master/conf/dm-master3.toml index 5f746ab210..9a82bd6376 100644 --- a/tests/ha_master/conf/dm-master3.toml +++ b/tests/ha_master/conf/dm-master3.toml @@ -4,3 +4,4 @@ master-addr = ":8461" advertise-addr = "localhost:8461" peer-urls = "localhost:8293" initial-cluster = "master1=http://localhost:8291,master2=http://localhost:8292,master3=http://localhost:8293,master4=http://localhost:8294,master5=http://localhost:8295" +auto-compaction-retention = "3s" diff --git a/tests/ha_master/conf/dm-master4.toml b/tests/ha_master/conf/dm-master4.toml index 5d2b093778..84c1143c30 100644 --- a/tests/ha_master/conf/dm-master4.toml +++ b/tests/ha_master/conf/dm-master4.toml @@ -4,3 +4,4 @@ master-addr = ":8561" advertise-addr = "localhost:8561" peer-urls = "localhost:8294" initial-cluster = "master1=http://localhost:8291,master2=http://localhost:8292,master3=http://localhost:8293,master4=http://localhost:8294,master5=http://localhost:8295" +auto-compaction-retention = "3s" diff --git a/tests/ha_master/conf/dm-master5.toml b/tests/ha_master/conf/dm-master5.toml index fd28f23ac8..461bb1b5aa 100644 --- a/tests/ha_master/conf/dm-master5.toml +++ b/tests/ha_master/conf/dm-master5.toml @@ -4,3 +4,4 @@ master-addr = ":8661" advertise-addr = "localhost:8661" peer-urls = "localhost:8295" initial-cluster = "master1=http://localhost:8291,master2=http://localhost:8292,master3=http://localhost:8293,master4=http://localhost:8294,master5=http://localhost:8295" +auto-compaction-retention = "3s" diff --git a/tests/handle_error/conf/dm-master.toml b/tests/handle_error/conf/dm-master.toml index aa24d7d7d3..e700eeffa5 100644 --- a/tests/handle_error/conf/dm-master.toml +++ b/tests/handle_error/conf/dm-master.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" +auto-compaction-retention = "3s" diff --git a/tests/http_apis/conf/dm-master.toml b/tests/http_apis/conf/dm-master.toml index 2811f72c6e..c9c8ec3fde 100644 --- a/tests/http_apis/conf/dm-master.toml +++ b/tests/http_apis/conf/dm-master.toml @@ -2,3 +2,4 @@ name = "master1" master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/import_goroutine_leak/conf/dm-master.toml b/tests/import_goroutine_leak/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/import_goroutine_leak/conf/dm-master.toml +++ b/tests/import_goroutine_leak/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/import_v10x/conf/dm-master.toml b/tests/import_v10x/conf/dm-master.toml index 3c534e9f28..f091bf702a 100644 --- a/tests/import_v10x/conf/dm-master.toml +++ b/tests/import_v10x/conf/dm-master.toml @@ -2,3 +2,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" v1-sources-path = "./v1-sources" +auto-compaction-retention = "3s" diff --git a/tests/incremental_mode/conf/dm-master.toml b/tests/incremental_mode/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/incremental_mode/conf/dm-master.toml +++ b/tests/incremental_mode/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/initial_unit/conf/dm-master.toml b/tests/initial_unit/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/initial_unit/conf/dm-master.toml +++ b/tests/initial_unit/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/load_interrupt/conf/dm-master.toml b/tests/load_interrupt/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/load_interrupt/conf/dm-master.toml +++ b/tests/load_interrupt/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/many_tables/conf/dm-master.toml b/tests/many_tables/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/many_tables/conf/dm-master.toml +++ b/tests/many_tables/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/online_ddl/conf/dm-master.toml b/tests/online_ddl/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/online_ddl/conf/dm-master.toml +++ b/tests/online_ddl/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/only_dml/conf/dm-master.toml b/tests/only_dml/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/only_dml/conf/dm-master.toml +++ b/tests/only_dml/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/print_status/conf/dm-master.toml b/tests/print_status/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/print_status/conf/dm-master.toml +++ b/tests/print_status/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/relay_interrupt/conf/dm-master.toml b/tests/relay_interrupt/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/relay_interrupt/conf/dm-master.toml +++ b/tests/relay_interrupt/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/retry_cancel/conf/dm-master.toml b/tests/retry_cancel/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/retry_cancel/conf/dm-master.toml +++ b/tests/retry_cancel/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/safe_mode/conf/dm-master.toml b/tests/safe_mode/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/safe_mode/conf/dm-master.toml +++ b/tests/safe_mode/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/sequence_safe_mode/conf/dm-master.toml b/tests/sequence_safe_mode/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/sequence_safe_mode/conf/dm-master.toml +++ b/tests/sequence_safe_mode/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/sequence_sharding/conf/dm-master.toml b/tests/sequence_sharding/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/sequence_sharding/conf/dm-master.toml +++ b/tests/sequence_sharding/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/sequence_sharding_optimistic/conf/dm-master.toml b/tests/sequence_sharding_optimistic/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/sequence_sharding_optimistic/conf/dm-master.toml +++ b/tests/sequence_sharding_optimistic/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/sequence_sharding_removemeta/conf/dm-master.toml b/tests/sequence_sharding_removemeta/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/sequence_sharding_removemeta/conf/dm-master.toml +++ b/tests/sequence_sharding_removemeta/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/shardddl1/conf/dm-master.toml b/tests/shardddl1/conf/dm-master.toml index aa24d7d7d3..e700eeffa5 100644 --- a/tests/shardddl1/conf/dm-master.toml +++ b/tests/shardddl1/conf/dm-master.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" +auto-compaction-retention = "3s" diff --git a/tests/shardddl2/conf/dm-master.toml b/tests/shardddl2/conf/dm-master.toml index aa24d7d7d3..e700eeffa5 100644 --- a/tests/shardddl2/conf/dm-master.toml +++ b/tests/shardddl2/conf/dm-master.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" +auto-compaction-retention = "3s" diff --git a/tests/shardddl3/conf/dm-master.toml b/tests/shardddl3/conf/dm-master.toml index aa24d7d7d3..e700eeffa5 100644 --- a/tests/shardddl3/conf/dm-master.toml +++ b/tests/shardddl3/conf/dm-master.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" +auto-compaction-retention = "3s" diff --git a/tests/sharding/conf/dm-master.toml b/tests/sharding/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/sharding/conf/dm-master.toml +++ b/tests/sharding/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/sharding2/conf/dm-master.toml b/tests/sharding2/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/sharding2/conf/dm-master.toml +++ b/tests/sharding2/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/start_task/conf/dm-master.toml b/tests/start_task/conf/dm-master.toml index 9a36bcbc84..7cecf59ad8 100644 --- a/tests/start_task/conf/dm-master.toml +++ b/tests/start_task/conf/dm-master.toml @@ -1,3 +1,4 @@ # Master Configuration. master-addr = ":8261" advertise-addr = "127.0.0.1:8261" +auto-compaction-retention = "3s" diff --git a/tests/tls/conf/dm-master1.toml b/tests/tls/conf/dm-master1.toml index fdae0252af..c321b44c7a 100644 --- a/tests/tls/conf/dm-master1.toml +++ b/tests/tls/conf/dm-master1.toml @@ -9,3 +9,4 @@ ssl-ca = "dir-placeholer/ca.pem" ssl-cert = "dir-placeholer/dm.pem" ssl-key = "dir-placeholer/dm.key" cert-allowed-cn = ["dm"] +auto-compaction-retention = "3s" diff --git a/tests/tls/conf/dm-master2.toml b/tests/tls/conf/dm-master2.toml index d107e4a4cd..6c977f5dc3 100644 --- a/tests/tls/conf/dm-master2.toml +++ b/tests/tls/conf/dm-master2.toml @@ -8,4 +8,5 @@ initial-cluster = "master1=https://127.0.0.1:8291,master2=http://127.0.0.1:8292, ssl-ca = "dir-placeholer/ca.pem" ssl-cert = "dir-placeholer/dm.pem" ssl-key = "dir-placeholer/dm.key" -cert-allowed-cn = ["dm"] \ No newline at end of file +cert-allowed-cn = ["dm"] +auto-compaction-retention = "3s" diff --git a/tests/tls/conf/dm-master3.toml b/tests/tls/conf/dm-master3.toml index 5e85ac017f..aaff43fc16 100644 --- a/tests/tls/conf/dm-master3.toml +++ b/tests/tls/conf/dm-master3.toml @@ -8,4 +8,5 @@ initial-cluster = "master1=http://127.0.0.1:8291,master2=https://127.0.0.1:8292, ssl-ca = "dir-placeholer/ca.pem" ssl-cert = "dir-placeholer/dm.pem" ssl-key = "dir-placeholer/dm.key" -cert-allowed-cn = ["dm"] \ No newline at end of file +cert-allowed-cn = ["dm"] +auto-compaction-retention = "3s" diff --git a/tests/upstream_switch/conf/dm-master.toml b/tests/upstream_switch/conf/dm-master.toml index aa24d7d7d3..e700eeffa5 100644 --- a/tests/upstream_switch/conf/dm-master.toml +++ b/tests/upstream_switch/conf/dm-master.toml @@ -4,3 +4,4 @@ master-addr = ":8261" advertise-addr = "127.0.0.1:8261" peer-urls = "127.0.0.1:8291" initial-cluster = "master1=http://127.0.0.1:8291" +auto-compaction-retention = "3s"