Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mysql): 分区兼容特殊业务 #8538 #8544

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ func (config *PartitionConfig) GetDbTableInfo(fromCron bool, host Host) (ptlist
// (2)兼容web、dnf业务的特殊定制类型,分区字段类型为int,但是系统记录为timestamp,因此无法核对比较,但不影响新增和删除分区。
// (3)兼容minigame业务的特殊定制类型,分区类型为0,但是实际定义与分区类型存在差异,因此无法核对比较,但不影响新增和删除分区。
webCustomization := config.BkBizId == 159 && config.PartitionColumn == "Fcreate_time"
iegamsCustomization := config.BkBizId == 5016839 && config.PartitionColumn == "Fcreate_time"
minigameCustomization := config.BkBizId == 121 && config.ImmuteDomain == "gamedb.game-record.minigame.db"
dnfCustomization := config.BkBizId == 105 && config.PartitionColumn == "occ_date"
if config.PartitionColumn != "" && !webCustomization && !minigameCustomization && !dnfCustomization {
if config.PartitionColumn != "" && !webCustomization && !iegamsCustomization &&
!minigameCustomization && !dnfCustomization {
// 分区表至少会有一个分区
for _, v := range output.CmdResults[0].TableData {
// 如果发现分区字段、分区间隔与规则不符合,需要重新做分区,页面调整了分区规则
Expand Down
Loading