fix(multi-review): 修复内存泄露#114
Merged
Merged
Conversation
Move session deletion into finally blocks so that sessions are always deleted regardless of whether the review/coordinator succeeds or fails. Previously, if a session was created successfully but a subsequent prompt() or messages() call threw or timed out, the catch block would return/throw without deleting the session, causing a memory leak on the opencode server.
|
可合并 所有四名 reviewer(质量、安全、性能、架构)一致认为该 PR 将 session 清理移至 阻塞项:无 📋 各 Reviewer 详细审查结果quality可合并 该 PR 将 session 清理从 try 块内和内联 try-catch 移入 阻塞项:无 建议项:无 security安全无虞 该 PR 将 session 清理逻辑从 阻塞项:无 建议项:无 performance性能良好 本次 PR 将 具体分析:
阻塞项:无 architecture架构合理 本次 PR 将 session 清理从 try 块末尾移至 阻塞项:无 建议项:无 |
分析结果无遗漏 该 PR 是针对性修复,目标明确:将
两条路径的边界条件都已正确处理:
没有遗漏。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

将 session 删除逻辑移到 finally 块中,确保无论成功还是失败路径都会清理 session,防止 opencode server 端内存泄露。