Conversation
Sync release to main after release
主要改进: - 创建 BaseFlowProxyPlugin 基类,提取公共功能 - 重构 proxy_plugin.py(代码减少42%,从240行降至140行) - 重构 web_server_plugin.py(代码减少27%,从370行降至270行) - 添加日志过滤器抑制预期的 BrokenPipeError 和 ConnectionResetError 警告 - 拆分大方法为专注的小方法,降低圈复杂度50-67% - 添加完整的测试覆盖和文档 技术细节: - BaseFlowProxyPlugin 提供统一的组件初始化和配置管理 - 支持 JWT 令牌自动故障转移 - 保持向后兼容性 - 所有 160 个测试通过
问题描述: - 每次请求都创建新的插件实例,导致 LoadBalancer 状态被重置 - 日志显示每次都是 request #1, index 0,负载均衡失效 解决方案: - 使用现有的 SharedComponentManager 来管理共享组件 - BaseFlowProxyPlugin 现在通过 initialize_plugin_components() 获取共享实例 - LoadBalancer 在所有插件实例间共享,保持一致的轮询状态 技术细节: - 重构 _initialize_components() 以使用 SharedComponentManager - 保持与现有测试框架的兼容性 - 线程安全的单例模式确保多线程/多进程环境下的正确性 - 所有 160 个测试通过
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.
No description provided.