-
Notifications
You must be signed in to change notification settings - Fork 185
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
语法错误等级做成用户可配置 #2460
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本信息(Version)
SQLE:main 3f884f0
DMS:main e1bd3f7
问题描述(Describe)
语法错误的提示默认是warn级别,当创建工单的最高触发规则级别设置为error时,在有语法错误时也能创建工单。这会导致在上线阶段报错时才发现有语法错误, 主要解决不能灵活配置错误等级问题
截图或日志(Log)
如何复现(To Reproduce)
创建工单的最高触发规则级别设置为error,有语法错误时也能创建工单
实现方案
现状:
审核预检查是否无法解析sql,触发后结果写死为(Warn, "", "语法错误或者解析器不支持,请人工确认SQL正确性")
并且没有rule_name,由于扩展插件对于无法解析sql处理的不确定性,导致无法统一处理或配置该结果的告警级别。
解决方案:
将“语法错误或者解析器不支持”作为一条全局配置的规则,并新增规则配置,记录是否开启语法错误检查和语法错误检查规则等级。预检查语法错误中判断改规则启用状态,并处理结果。
该规则所属于全局配置、告警级别默认为error
变更影响面
受影响的模块或功能
外部引用的潜在问题或风险
无
版本兼容性
首次导入mysql规则后时,该规则默认开启,当数据库中已存在mysql默认规则模板时,需要手动开启或使用upgrade-tooles进行升级开启改规则。
测试建议
The text was updated successfully, but these errors were encountered: