Skip to content

feat: skip immediate first collect on scan task start - #3356

Closed
LordofAvernus wants to merge 1 commit into
mainfrom
dev-sqle-skip-restart-full-collect
Closed

LordofAvernus wants to merge 1 commit into
mainfrom
dev-sqle-skip-restart-full-collect

Conversation

@LordofAvernus

@LordofAvernus LordofAvernus commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

User description

关联的 issue

https://github.com/actiontech/sqle-ee/issues/3053

描述你的变更

  • 删除 TaskWrapper.loop 入口处立刻调用的 extractSQL(),启动/重建只注册周期 ticker
  • 保留 interval==0 告警返回与 tick 分支内采集;Manager / startAuditPlan 路径不变
  • 产品接受重启到下一周期之间的采集空窗;「立即采集」另开任务

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

Made with Cursor


Description

  • 移除 TaskWrapper.loop 中 extractSQL() 的即时调用

  • 延迟采集,等待周期性定时器启动


Diagram Walkthrough

flowchart LR
  A["检查任务间隔是否为零"] -- 否 --> B["跳过 extractSQL() 调用"]
  B -- 注册定时器 --> C["开始周期性采集"]
Loading

File Walkthrough

Relevant files
Enhancement
task_wrap.go
删除即时采集调用                                                                                                 

sqle/server/auditplan/task_wrap.go

  • 删除即时调用 extractSQL() 以推迟采集
  • 保留定时器注册逻辑
+0/-1     

Remove extractSQL() at TaskWrapper.loop entry so restart/rebuild only
registers the ticker; first collect waits for the period tick.

Fixes actiontech/sqle-ee#3053

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🎫 Ticket compliance analysis 🔶

3053 - Partially compliant

Compliant requirements:

  • 删除 TaskWrapper.loop 中 extractSQL() 的立即调用
  • 延迟采集,等待周期性定时器启动

Non-compliant requirements:

Requires further human verification:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@LordofAvernus

Copy link
Copy Markdown
Collaborator Author

基线纠正

本 PR 目标分支 main 打错基线。正确交付目标为浙江农信客户分支 sqle-ee@zjrc_3.2408(关联 Issue https://github.com/actiontech/sqle-ee/issues/3053),请勿合入 main。

关闭本 PR,改走 sqle-ee 客户分支 PR。

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