Skip to content

Commit

Permalink
fix(mysql): 校验单据时长 #7997
Browse files Browse the repository at this point in the history
  • Loading branch information
xfwduke committed Nov 20, 2024
1 parent a4786fe commit a9d5bf8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a9d5bf8

Please sign in to comment.