Repository navigation
fix: 被取代接受循环的杂音 Connecting 与迟到接入语义定稿(#68 PR-3) - #96
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.
关闭范围:#68 的 PR-3——统一发布入口的最后一块:被取代接受循环的 Connecting 发布与迟到 accept 的处置语义。至此 #68 的代码侧范围(行为基线、Session 对象化、拆除分段、发布收敛)全部完成。
改动
① 代次复查前置:被取代的接受循环从重试退避中醒来时,此前会先发布 Connecting 再检查代次退出——状态序列混入替换者之外的杂音。现复查前置,被取代循环零发布。
② 迟到 accept 收编语义定稿(实现 + 文档 + 测试锁定):被取代循环迟到完成的 accept 照常发布 Connected 并建立会话。理由:监听器是连接级共享资源(
InitServer复用_server),客户端向服务器端口的接入本身合法;收编后由纪元机制与会话隔离收敛(取代者循环取锁后经代次检查静默退出)。RapidServerInitiatedReconnects回归测试随即确定性复现真实客户端被重置吞掉——违背接入契约,已回退并在 DESIGN/CHANGELOG 记录否决理由。测试
ReconnectWhileAccepting_LateClientStillAdmittedBySupersededLoop:accept 等待期间 Reconnect 取代循环(Retry/Connecting 发布在 Reconnect 返回前同步完成,全确定性),迟到客户端照常收编,状态序列恰为 Connecting→Retry→Connecting→Connected。RapidServerInitiatedReconnects首次连接等待预算 10s→30s,与同测试下方 30s 及其注释哲学对齐(探测永久不可用,并行负载下偶发慢收敛不应误报;bug: 用户显式 Reconnect() 与自动重连竞速可长期楔死被动端监听(重绑失败 + 接受循环持有锁重试) #47 契约由 20s 重绑死线探测,不受影响)。验证与如实披露
RapidServerInitiatedReconnects(3 次,含一次 30s 全预算挂起)。关联