SessionPool acquire: growth/hand-out failures bypass acquire_timeout budget; live counter decremented outside the state lock loses Condvar wakeups; acquire_timeout = Duration::MAX panics
还没有人认领这个 Issue。
评估
调研方向
先定位 SessionPool::acquire,追踪 open_session 的增长路径和 hand_out 的 USE 重放路径,然后检查相对于状态锁和 Condvar 通知的每一处 live 变更。验证失败会一直重试到原始 deadline,live 的递减会在锁内通知等待者,并且使用 Duration::MAX 等待时不会溢出;使用 fake-listener 压力测试复现该行为。
由索引模型根据 Issue 内容生成。
描述
Three related pool-accounting defects found by stress-testing SessionPool against fake listeners:
acquire()spends none of itsacquire_timeoutbudget when the growth branch fails. Whenopen_session()fails,acquire()returns the error immediately (measured 198us against a 5s budget; 4136 of 4800 acquires failed instantly under stress while sessions were circulating). The same happens when theUSEreplay inhand_outfails — it discards the remaining idle candidates instead of retrying the loop.liveis decremented outside thestatelock at several sites, and the decremented value is exactly the predicate parked waiters re-evaluate, so Condvar notifications can be lost. The comment "Only mutated while holdingstate" no longer matches the code. Measured stalls trackacquire_timeoutexactly (300ms → 305ms, 1000ms → 1.005s).acquire_timeout = Duration::MAXpanics onInstant::now() + acquire_timeoutoverflow before the lock is taken. There is no "never time out" option, andDuration::MAXis the natural way to ask for one.
Fix: on growth/hand-out failure, re-take the lock, decrement live under it, notify, and continue the loop (bounded by the original deadline); use a saturating deadline (checked_add) so Duration::MAX means "wait without timeout".
- 主要语言
- Rust
- 星标
- 1
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iotdb-client-rust 的其他 Issue
-
Session::open does not fail over when openSession/requestStatementId fails (only TCP-layer failover) 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 3/5 1-2 天 新手友好度 65/100
apache/iotdb-client-rust#10 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 45/100
-
bug
难度 4/5 3-5 天 新手友好度 55/100
-
bug
难度 3/5 1-2 天 新手友好度 68/100
查看 apache/iotdb-client-rust 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
TheLarkInn/aipm#2413 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
难度 2/5 1-3 小时 新手友好度 75/100
-
todo:ticket
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
taikoxyz/taiko-mono#22168 · 1 条评论 ·