diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go index e9293b7664..20539d8fbd 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go @@ -131,7 +131,7 @@ func (c *PtTableChecksumComp) GenerateConfigFile() (err error) { c.Params.BkBizId, c.Params.ClusterId, c.Params.MasterPort, c.Params.InnerRole, "", c.Params.ImmuteDomain, c.Params.MasterIp, c.GeneralParam.RuntimeAccountParam.MonitorUser, c.GeneralParam.RuntimeAccountParam.MonitorPwd, - "http://127.0.0.1:9999", logDir, c.tools) + "http://127.0.0.1:9999", logDir, c.Params.RuntimeHour, c.tools) cfg.PtChecksum.Replicate = c.Params.ReplicateTable diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/init.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/init.go index fee7bd60d7..30507ee9aa 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/init.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/init.go @@ -48,6 +48,7 @@ type instanceInfo struct { func NewRuntimeConfig( bkBizId, clusterId, port int, role, schedule, immuteDomain, ip, user, password, apiUrl, logDir string, + runtimeHour int, tl *tools.ToolSet) *config.Config { cfg := config.Config{ BkBizId: bkBizId, @@ -71,7 +72,7 @@ func NewRuntimeConfig( Args: []map[string]interface{}{ { "name": "run-time", - "value": "2h", + "value": fmt.Sprintf("%dh", runtimeHour), }, }, Replicate: fmt.Sprintf("%s.checksum", native.INFODBA_SCHEMA), diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/runtime_config.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/runtime_config.go index 5e3775408c..927a180bfb 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/runtime_config.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/peripheraltools/checksum/runtime_config.go @@ -35,7 +35,7 @@ func generateRuntimeConfigIns(mcp *MySQLChecksumParam, instance *instanceInfo, r cfg := NewRuntimeConfig( instance.BkBizId, instance.ClusterId, instance.Port, instance.Role, instance.Schedule, instance.ImmuteDomain, instance.Ip, - rtap.MonitorUser, rtap.MonitorPwd, mcp.ApiUrl, logDir, tl) + rtap.MonitorUser, rtap.MonitorPwd, mcp.ApiUrl, logDir, 2, tl) cfg.SetFilter(nil, ignoreDbs, nil, nil) b, err := yaml.Marshal(&cfg)