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

perf: 归档作业执行历史delete操作设置binlog_format=statement #1728

Closed
wangyu096 opened this issue Feb 8, 2023 · 1 comment
Closed
Assignees
Labels
done 已上线到正式环境并验收通过 kind/enhancement 功能改进特性

Comments

@wangyu096
Copy link
Collaborator

No description provided.

@wangyu096 wangyu096 added the kind/enhancement 功能改进特性 label Feb 8, 2023
@wangyu096 wangyu096 self-assigned this Feb 8, 2023
@wangyu096
Copy link
Collaborator Author

问题背景

由于未设置binlog_format的格式,默认使用了row模式。在job-backup的归档job执行历史数据的程序中,会批量删除数据,SQL 如下:

delete from task_instance where id > 1000 and id <= 2000 limit 100;

由于binlog_format=row, 主从DB同步数据的时候,批量删除会被拆分为一行一行的delete,导致主从DB延迟

jsonwan added a commit that referenced this issue Feb 22, 2023
perf: 归档作业执行历史delete操作设置binlog_format=statement #1728
@bkjob-bot bkjob-bot added the done 已上线到正式环境并验收通过 label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done 已上线到正式环境并验收通过 kind/enhancement 功能改进特性
Projects
None yet
Development

No branches or pull requests

2 participants