Skip to content

fix: 修复临时脚本线程泄漏(OOM 根因)并升级版本至 3.4.55 - #209

Merged
xlorne merged 1 commit into
mainfrom
dev
Aug 6, 2026
Merged

fix: 修复临时脚本线程泄漏(OOM 根因)并升级版本至 3.4.55#209
xlorne merged 1 commit into
mainfrom
dev

Conversation

@xlorne

@xlorne xlorne commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  • TempGroovyScriptContext 改用共享 daemon 调度线程,根治每脚本 new Timer() 的原生线程泄漏
  • 覆盖/删除/清空/cache-miss 时 cancel 定时任务,ConcurrentHashMap 防并发
  • 修正绝对到期时间戳误传为相对延迟的清理 bug(原实现约 55 年后才触发,自动清理从未生效)
  • 原子化 remove(key, value) 防止过期任务误删被刷新脚本
  • 新增回归测试 TempGroovyScriptContextTest(线程数不增长 + 到期自动清理)
  • 版本号 3.4.54 → 3.4.55(全部 pom + CLAUDE.md)

Describe what this PR does / why we need it

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

- TempGroovyScriptContext 改用共享 daemon 调度线程,根治每脚本 new Timer() 的原生线程泄漏
- 覆盖/删除/清空/cache-miss 时 cancel 定时任务,ConcurrentHashMap 防并发
- 修正绝对到期时间戳误传为相对延迟的清理 bug(原实现约 55 年后才触发,自动清理从未生效)
- 原子化 remove(key, value) 防止过期任务误删被刷新脚本
- 新增回归测试 TempGroovyScriptContextTest(线程数不增长 + 到期自动清理)
- 版本号 3.4.54 → 3.4.55(全部 pom + CLAUDE.md)

Co-Authored-By: Claude <noreply@anthropic.com>
@xlorne
xlorne merged commit c03491e into main Aug 6, 2026
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.

1 participant