Skip to content

Commit f392066

Browse files
xfan0805iSecloud
authored andcommitted
fix: fix_partition_block_issue TencentBlueKing#16043
1 parent 3be7bbe commit f392066

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

dbm-services/mysql/db-partition/service/check_partition_base_func.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ func (config *PartitionConfig) GetPartitionDbLikeTbLike(dbtype string, splitCnt
4949
Addresses: []string{fmt.Sprintf("%s:%d", host.Ip, host.Port)},
5050
Cmds: []string{
5151
"set lock_wait_timeout=10",
52-
fmt.Sprintf("FLUSH TABLE `%s`.`%s` with read lock", tb.DbName, tb.TbName),
52+
// fmt.Sprintf("FLUSH TABLE `%s`.`%s` with read lock", tb.DbName, tb.TbName),
53+
fmt.Sprintf("FLUSH TABLE `%s`.`%s`", tb.DbName, tb.TbName),
5354
},
54-
Force: true,
55+
Force: false,
5556
QueryTimeout: 10,
5657
BkCloudId: host.BkCloudId,
5758
})
@@ -115,9 +116,10 @@ func (config *PartitionConfig) getOneTableInfo(address string, bkCloudId int, ro
115116
// 转换成锁等待, 能正常退出
116117
Cmds: []string{
117118
"set lock_wait_timeout=10",
118-
fmt.Sprintf("FLUSH TABLES `%s`.`%s` with read lock", db, tb),
119+
// fmt.Sprintf("FLUSH TABLES `%s`.`%s` with read lock", db, tb),
120+
fmt.Sprintf("FLUSH TABLES `%s`.`%s`", db, tb),
119121
},
120-
Force: true,
122+
Force: false,
121123
QueryTimeout: 10,
122124
BkCloudId: bkCloudId,
123125
})

dbm-ui/backend/db_periodic_task/local_tasks/mysql_partition/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
logger = logging.getLogger("flow")
3434

3535

36-
@register_periodic_task(run_every=crontab(minute=3, hour="3"))
36+
@register_periodic_task(run_every=crontab(minute=3, hour="1"))
3737
def tendbha_partition_task():
3838
logger.info("start tendbha partition task v2!")
3939
# 异步执行,执行前以集群为单位生成参数 集群内根据分区配置量再进行切分
@@ -42,7 +42,7 @@ def tendbha_partition_task():
4242
execute_one_tendbha_domain_task.apply_async(args=[info])
4343

4444

45-
@register_periodic_task(run_every=crontab(minute=3, hour="3"))
45+
@register_periodic_task(run_every=crontab(minute=3, hour="1"))
4646
def tendbcluster_partition_task():
4747
logger.info("start tendbcluste partition task v2!")
4848
domain_infos = get_exec_domain_info(ClusterType.TenDBCluster.value)

0 commit comments

Comments
 (0)