Skip to content

Commit

Permalink
fix(dbm-services): 修正处理mysql不同版本配置 TencentBlueKing#7381
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and iSecloud committed Oct 16, 2024
1 parent a327b26 commit 15e61b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def __init__(self, root_id: str, data: Optional[Dict]):
self.threads = 0
self.bk_cloud_id = 0
# stream mydumper & myloader 流式备份导入,否则退化成mysqldump方式
self.use_mydumper = True
self.use_mydumper = False
if self.data.get("use_mydumper"):
self.use_mydumper = self.data["use_mydumper"]
self.stream = False
if self.data.get("use_stream"):
self.stream = self.data["use_stream"]
Expand Down
2 changes: 1 addition & 1 deletion dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def deal_mysql_config(self, db_version: str, origin_configs: dict, init_configs:
# 介质管理暂未记录介质来源属性
if db_version >= "8.0.30":
is_community = True
cfg = self.deal_with_upgrade_to_mysql80(is_community=is_community, cfg=cfg)
cfg = self.deal_with_upgrade_to_mysql80(is_community=is_community, cfg=cfg)

return cfg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TenDBClusterAppendDeployCTLDetailSerializer(TendbBaseOperateDetailSerializ
use_stream = serializers.BooleanField(help_text=_("是否使用mydumper流式备份迁移"), required=False, default=False)
drop_before = serializers.BooleanField(help_text=_("导入到tdbctl前,是否先删除"), required=False, default=False)
threads = serializers.IntegerField(help_text=_("mydumper 并发"), required=False, default=0)
use_mydumper = serializers.BooleanField(help_text=_("是否使用mydumper,myloader迁移"), required=False, default=True)
use_mydumper = serializers.BooleanField(help_text=_("是否使用mydumper,myloader迁移"), required=False, default=False)

def validate(self, attrs):
self.__validate_cluster(attrs=attrs)
Expand Down

0 comments on commit 15e61b0

Please sign in to comment.