Skip to content

Commit

Permalink
fix(redis): 回档job超时 TencentBlueKing#7571
Browse files Browse the repository at this point in the history
  • Loading branch information
OMG-By authored and iSecloud committed Nov 5, 2024
1 parent b281ed6 commit fa6e17f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,9 @@ func (incr *TredisRocksDBIncrBack) ImportOneBinlogToTredis(tplusIP string, tplus
// NOCC:tosa/linelength(设计如此)
importCmd := fmt.Sprintf("%s --no-raw --no-auth-warning -h %s -p %d -a %s < %s > %s", consts.RedisCliBin, tplusIP, tplusPort,
tplusPasswd, cmdfile, outfile)
mylog.Logger.Info("binlog 写入命令:%v", importCmd)
importFmtCmd := fmt.Sprintf("%s --no-raw --no-auth-warning -h %s -p %d -a xxxx < %s > %s", consts.RedisCliBin, tplusIP, tplusPort,
cmdfile, outfile)
mylog.Logger.Info("binlog 写入命令:%v", importFmtCmd)
_, err = util.RunLocalCmd("bash", []string{"-c", importCmd}, "", nil, 1*time.Hour)
if err != nil {
mylog.Logger.Error(fmt.Sprintf("导入binlog 命令失败,详情:%v", err))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,9 @@ func (incr *TredisRocksDBIncrBack) ImportOneBinlogToTredis(tplusIP string, tplus
// NOCC:tosa/linelength(设计如此)
importCmd := fmt.Sprintf("%s --no-raw --no-auth-warning -h %s -p %d -a %s < %s > %s", consts.RedisCliBin, tplusIP, tplusPort,
tplusPasswd, cmdfile, outfile)
mylog.Logger.Info("binlog 写入命令:%v", importCmd)
importFmtCmd := fmt.Sprintf("%s --no-raw --no-auth-warning -h %s -p %d -a xxxx < %s > %s", consts.RedisCliBin, tplusIP, tplusPort,
cmdfile, outfile)
mylog.Logger.Info("binlog 写入命令:%v", importFmtCmd)
_, err = util.RunLocalCmd("bash", []string{"-c", importCmd}, "", nil, 1*time.Hour)
if err != nil {
mylog.Logger.Error(fmt.Sprintf("导入binlog 命令失败,详情:%v", err))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ def backup_and_restore(
act_kwargs.cluster["backup_instances"] = []
act_kwargs.cluster["ssd_log_count"] = {
"log-count": 600000,
"log-keep-count": 7650000,
"slave-log-keep-count": 7650000,
"log-keep-count": 20000000,
"slave-log-keep-count": 20000000,
}
act_kwargs.cluster["domain_name"] = act_kwargs.cluster["immute_domain"]
for sync_direct in params["ins_link"]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def _execute(self, data, parent_data) -> bool:
"script_content": base64_encode(template.render(db_act_template)),
"script_language": 1,
"target_server": {"ip_list": target_ip_info},
"timeout": 86400,
}

self.log_info(
Expand Down

0 comments on commit fa6e17f

Please sign in to comment.