Repository navigation
fix: isolate stalled streams and propagate stream cancellation - #121
Merged
Merged
Conversation
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.
修复
单个不读数据的 stream 原先会阻塞共享分发与控制消息,使同连接其他流和关闭操作停滞。加入协商逐流字节/包窗口、控制消息独立推进和 StreamReset;可取消开流、ForceClose 与 AbortStream 明确分工,异常中断后后续流仍可使用。补齐初始化失败与关闭并发清理心跳 tick 的竞争修复;用标准库定时器保证流 deadline 唤醒阻塞 I/O,过去期限立即生效,旧回调不会影响重置后的期限。
Closes #119
Closes #120
Closes #122
Closes #123
验证
已有完整 race/chaos 验证记录见 docs/validation/20261106-flow-reset.md。本次包含 heartbeat/deadline 修复的 make test-race vet 完整通过(chaos 229 秒);追加 RPC context 修复后 TestRPCTimeout 连续 100 次 race 通过。最终 fc1b480 下 Frontier make verify-pr 通过,含跨 Frontier 流控/reset 三轮、100 Edge 并发连接三轮。最终提交同时由 GitHub CI 执行多平台与完整检查。
兼容与范围
只有成功协商的连接使用新控制包;旧端回退不保证同等慢流隔离和远端异常终止。公开接口的新增方法会要求第三方实现/Mock 对应适配。详见 docs/FORCE_CLOSE.md 和 docs/MULTIPLEXING.md。
不关闭 #117;没有证明 RPC 重连注册丢失已解决。回滚时同时回滚依赖新增 API 的下游,旧协议端可互通但失去新隔离能力。
补充:RPC handler 在传播的 context 过期后不会再返回空成功结果;TestRPCTimeout 连续 100 次 race 通过。