Flaky: concurrent_hard_miss_errors_are_returned_to_each_caller can count two loader calls
维护者通常 5 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 crates/cache/src/tests.rs 开始,重点查看 concurrent_hard_miss_errors_are_returned_to_each_caller 及其运行时配置。检查暂停的时间和已启动的任务如何与 loader 的休眠交互。调整测试,使八个调用方都在 loader 完成前到达正在处理的条目,然后确认测试仍会验证 loader 只调用一次,并且每个调用方都收到错误。
由索引模型根据 Issue 内容生成。
描述
crates/cache/src/tests.rs, concurrent_hard_miss_errors_are_returned_to_each_caller, failed in the mongodb-rust job of PR #970, a change to one docs file (job 133779105987, 17 November 02:55 UTC):
thread 'tests::concurrent_hard_miss_errors_are_returned_to_each_caller' panicked at crates/cache/src/tests.rs:850:5:
assertion `left == right` failed: 8 concurrent hard-miss callers must collapse to exactly one loader call
left: 2
right: 1
The test spawns 8 tasks that each call cache.get("k"). The loader sleeps 30 ms and returns an error, and errors are not cached. A task that first runs after the first loader call ended finds no single-flight entry and starts a second call. On a loaded runner a spawned task can start more than 30 ms late, so the count of 2 needs no defect in the cache.
Fix: the test runs on a multi-thread runtime (flavor = "multi_thread", worker_threads = 4). On a current-thread runtime with start_paused = true, the clock advances only when every task waits, so all 8 calls reach the in-flight entry before the loader's sleep ends. If the test must keep the multi-thread runtime, a loader sleep far above a runner's scheduling delay makes the second call unlikely, not impossible.
- 主要语言
- Rust
- 星标
- 517
- 派生
- 60
- 平均合并
- 5 天 14 小时
- 30 天内合并 PR
- 124
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ExtendDB/extenddb 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 87/100
维护者通常 5 天内回复
查看 ExtendDB/extenddb 的全部 Issue
相似的 Issue
-
bug studies ui
难度 2/5 1-3 小时 新手友好度 82/100
userFRM/egui-charts#3308 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
meerkat-lang/meerkat#279 ·
维护者通常 1 天内回复
-
a launchd removal test races the fake's refusal against bootout under load可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 74/100
nledford/Ladderback#907 ·
维护者通常 1 天内回复