Skip to content

Commit

Permalink
feat: 定点回档物理备份changeMasterTEST TencentBlueKing#8338
Browse files Browse the repository at this point in the history
  • Loading branch information
zfrendo committed Dec 4, 2024
1 parent b780283 commit adf0c2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbm-ui/backend/configuration/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# sqlserver的用户登录admin账号名称
SQLSERVER_ADMIN_USER = "dbm_admin"
# TODO: job超时时间最大为86400,后续考虑让job平台调大限制
MYSQL_DATA_RESTORE_TIME = 259200
MYSQL_DATA_RESTORE_TIME = 86400
MYSQL_USUAL_JOB_TIME = 7200
MYSQL8_VER_PARSE_NUM = 8000000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ def remote_node_rollback(root_id: str, ticket_data: dict, cluster: dict):

sub_pipeline = SubBuilder(root_id=root_id, data=ticket_data)
exec_act_kwargs = ExecActuatorKwargs(
bk_cloud_id=int(cluster["bk_cloud_id"]), cluster_type=ClusterType.TenDBCluster, cluster=cluster
bk_cloud_id=int(cluster["bk_cloud_id"]), cluster_type=ClusterType.TenDBCluster,
cluster=copy.deepcopy(cluster)
)
exec_act_kwargs.get_mysql_payload_func = MysqlActPayload.mysql_mkdir_dir.__name__
exec_act_kwargs.exec_ip = cluster["rollback_ip"]
Expand Down Expand Up @@ -227,6 +228,8 @@ def remote_node_rollback(root_id: str, ticket_data: dict, cluster: dict):
# 针对slave repeater角色的从库。建立复制链路。重置slave>添加复制账号和获取位点>建立主从关系
sub_pipeline_all.add_parallel_sub_pipeline(sub_pipeline_all_list)
backup_type = backup_info.get("backup_type", "")
# todo 测试用
backup_type = MySQLBackupTypeEnum.PHYSICAL.value
# repl_pipeline_list = []
if cluster["new_master"]["instance"] != cluster["new_slave"]["instance"]:
# repl_pipeline = SubBuilder(root_id=root_id, data=copy.deepcopy(ticket_data))
Expand Down

0 comments on commit adf0c2a

Please sign in to comment.