ManyCar doesn't forward put_many_keyed
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- database, performance
调研方向
从 src/db/car/many.rs 开始,issue 指出 ManyCar 实现了 Blockstore,请检查它如何将 get 和 put_keyed 转发给其 writer。按照 issue 中所示添加对 put_many_keyed 的转发,然后运行相关的 ManyCar 或 blockstore 测试,以确认批量写入到达 writer;issue 没有指定具体的测试文件。
由索引模型根据 Issue 内容生成。
描述
Hey! Was reading through the db code and noticed ManyCar's Blockstore impl only overrides get and put_keyed (many.rs#L225-L244). So put_many_keyed falls back to the default and writes one block at a time, and ParityDb's batched version never gets called.
Since the daemon's store is a ManyCar over the GC'd ParityDb, I think this turns the post-export GC backfill (snapshot.rs#L445) and the write buffer flushes (migrations, CAR imports) into one commit per block instead of one per batch.
The fix should just be forwarding it to the writer:
fn put_many_keyed<D, I>(&self, blocks: I) -> anyhow::Result<()>
where
Self: Sized,
D: AsRef<[u8]>,
I: IntoIterator<Item = (Cid, D)>,
{
self.writer.put_many_keyed(blocks)
}
Happy to send a PR if that sounds right.
(Found this with help from Claude Code; I checked the code paths myself.)
- 主要语言
- Rust
- 星标
- 700
- 派生
- 201
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 65
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ChainSafe/forest 的其他 Issue
-
Bug
难度 3/5 1-2 天 新手友好度 20/100
维护者通常 1 天内回复
-
[automated] `cargo deny check advisories` failure @ 20/11/26 00:01可能已有人在做 @akaladarshi 今天认领。 未关闭Bug
难度 1/5 1 小时以内 新手友好度 15/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
维护者通常 1 天内回复
-
FIP-0119 implementation in `builtin-actors`可能已有人在做 @LesnyRumcajs 于 2 天前认领。 未关闭Type: Task
ChainSafe/forest#7886 · 已指派 1 人 ·
维护者通常 1 天内回复
-
allow to skip downloading enriched snapshots可能已有人在做 @EclesioMeloJunior 于 2 天前认领。 未关闭Type: Task
ChainSafe/forest#7885 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
eandualem/agent-interface#290 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
benchmark-review
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复