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

添加业务低峰时间范围,ddl只能够在在业务低峰执行选项,避免非dba执行sql锁表影响业务 #2731

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

woshiyanghai
Copy link
Contributor

添加业务低峰时间范围,ddl只能够在在业务低峰执行选项,避免非dba执行ddl sql 使用了copy算法锁表

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 56.25000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 78.33%. Comparing base (69e29b1) to head (5b5d83d).

Files with missing lines Patch % Lines
sql/utils/sql_review.py 65.00% 7 Missing ⚠️
sql/sql_workflow.py 33.33% 4 Missing ⚠️
sql_api/api_workflow.py 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2731      +/-   ##
==========================================
- Coverage   78.37%   78.33%   -0.05%     
==========================================
  Files         124      124              
  Lines       17598    17629      +31     
==========================================
+ Hits        13793    13810      +17     
- Misses       3805     3819      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LeoQuote
Copy link
Collaborator

我建议将配置项精简为两个配置项:

  1. DDL可执行时间 ,可填写类似 8:00-12:00,14:00-18:00 这类的多个时间窗口
  2. 临时禁止DDL执行的开关,供管理员在有需要时使用。

可执行时间范围和当前实现比较,配置起来少一个配置项,且可配置多个时间窗口,更加灵活。

@woshiyanghai
Copy link
Contributor Author

我建议将配置项精简为两个配置项:

  1. DDL可执行时间 ,可填写类似 8:00-12:00,14:00-18:00 这类的多个时间窗口
  2. 临时禁止DDL执行的开关,供管理员在有需要时使用。

可执行时间范围和当前实现比较,配置起来少一个配置项,且可配置多个时间窗口,更加灵活。

很好的建议,我尝试实现下

@woshiyanghai
Copy link
Contributor Author

image
增加这样一个选择框,可以选择dml或者ddl,在业务低峰时间段来执行选项。

@woshiyanghai
Copy link
Contributor Author

最近在使用过程中发现,比如一个公司有多个db,他们的业务高低峰时段是不同的,有些需要配置这个业务高峰不允许执行的限制,但是有些db本来就只有这个业务团队使用,那完全没必要限制。
原来的实现方式,是一个全局的窗口这样不够灵活,如果在实力级别添加一个字段标注业务高低峰时段,这样是否更好一点?

@LeoQuote
Copy link
Collaborator

确实是很好的想法, 确实可以这样去实现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants