Skip to content

Commit

Permalink
fix: 修复spider_master时出现异常 #5172
Browse files Browse the repository at this point in the history
  • Loading branch information
yksitu authored and jinquantianxia committed Jun 27, 2024
1 parent f40f39c commit 972c377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,8 @@ def reduce_ctls_routing(root_id: str, parent_global_data: dict, cluster: Cluster
),
}
)
sub_pipeline.add_parallel_acts(acts_list=acts_list)
if len(acts_list) > 0:
sub_pipeline.add_parallel_acts(acts_list=acts_list)

return sub_pipeline.build_sub_process(sub_name=_("删除中控的路由节点"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __calc_reduce_spiders(
# 选择上尽量避开ctl_primary的选择, 避免做一次切换逻辑
reduce_spiders = cluster.proxyinstance_set.filter(
tendbclusterspiderext__spider_role=reduce_spider_role
).exclude(machine__ip=ctl_primary.split(":"[0]))[: spiders_count - spider_reduced_to_count]
).exclude(machine__ip=ctl_primary.split(":")[0])[: spiders_count - spider_reduced_to_count]

return [{"ip": s.machine.ip} for s in reduce_spiders]

Expand Down

0 comments on commit 972c377

Please sign in to comment.