Skip to content

Commit

Permalink
fix(backend): spider 缩容问题 #4951
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhw8 committed Jun 14, 2024
1 parent a3226da commit c0d04e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def reduce_ctls_routing(root_id: str, parent_global_data: dict, cluster: Cluster
)

# 因为ctl集群是采用GTID+半同步数据同步,所以理论上选择任意一个从节点作为主,数据不会丢失
new_ctl_primary = all_ctl.exclude(machine__ip__in=[ip_info["ip"] for ip_info in reduce_ctls]).first()
new_ctl_primary = all_ctl.exclude(machine__ip__in=[ip_info.machine.ip for ip_info in reduce_ctls]).first()

sub_pipeline.add_act(
act_name=_("切换ctl中控集群"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _sync_to_new_master(self, cluster: Cluster, new_primary, other_secondary):
# 基于GTID建立同步
for secondary in other_secondary:
repl_sql = (
f"CHANGE MASTER TO"
f"CHANGE MASTER TO "
f"MASTER_HOST ='{new_primary.split(':')[0]}',"
f"MASTER_PORT={new_primary.split(':')[1]},"
f"MASTER_USER ='{data['repl_user']}',"
Expand Down
2 changes: 0 additions & 2 deletions helm-charts/bk-dbm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ db-simulation:
TRACE_DATA_ID: ""
# 模拟执行使用专用Node
# 需要迁移给专用节点打标签和污点
simulationNodeLables: { bkdbm/simulation: "high-performance" }
simulationtaintLables: { bkdbm/simulation: "high-performance" }
# 配置模拟执行 pod 的资源限额
# tdbctlPodResource:
# limits:
Expand Down

0 comments on commit c0d04e2

Please sign in to comment.