Make RestCatalog safe to share across threads
维护者通常 2 天内回复
评估
调研方向
Read src/iceberg/catalog/rest/rest_catalog.cc around AsCatalog() at lines 565–573, then inspect the HttpClient path and the linked issue #1089 to understand the shared request state. Make the default catalog cache safe for concurrent access and confirm the linked HTTP client work supports sharing; done means concurrent catalog use has no data race. An open pull request, #1092, is already linked.
由索引模型根据 Issue 内容生成。
描述
Currently, RestCatalog doesn't document whether one instance can be shared between threads. Query engines usually share one catalog across concurrent queries (for example Spark within a session, Trino, and DuckDB), and iceberg-rust requires catalogs to be Send + Sync (code).
Without that guarantee, an embedder has to serialize every catalog call behind its own lock. That costs throughput, and one hung request then blocks every other caller. In https://github.com/smaheshwar-pltr/duckdb-proto-iceberg, we observed that making a catalog-heavy test about 4x slower.
RestCatalog is close to thread-safe already. After Make(), the only state it changes is the default catalog that AsCatalog() caches in a weak_ptr. It reads and writes that cache without a lock, so concurrent AsCatalog() calls race (rest_catalog.cc#L565-L573).
Note: sharing a catalog also depends on https://github.com/apache/iceberg-cpp/issues/1089, because every request goes through one HttpClient.
- 主要语言
- C++
- 星标
- 227
- 派生
- 142
- 平均合并
- 3 天 21 分钟
- 30 天内合并 PR
- 70
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iceberg-cpp 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
apache/iceberg-cpp#1103 ·
维护者通常 2 天内回复
-
help wanted
难度 4/5 3-5 天 新手友好度 48/100
apache/iceberg-cpp#1101 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
apache/iceberg-cpp#1099 ·
维护者通常 2 天内回复
-
Complete OAuth2 token refresh and expiration support (Java-compatible)可能已有人在做 @lishuxu 于 2 天前认领。 未关闭
apache/iceberg-cpp#1095 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
RestCatalog: concurrent HTTP requests can crash in libcurl可能已有人在做 @smaheshwar-pltr 于 3 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 20/100
apache/iceberg-cpp#1089 ·
维护者通常 2 天内回复
查看 apache/iceberg-cpp 的全部 Issue
相似的 Issue
-
ai_p2
难度 2/5 1-3 小时 新手友好度 82/100
ClickHouse/ClickHouse#130006 ·
维护者通常 1 天内回复
-
DepotMaintain: EN longer string moves the hint popup buttons out of reach // WpfGUI English Language未关闭client: WpfGui module: depot question
难度 2/5 1-3 小时 新手友好度 64/100
MaaAssistantArknights/MaaAssistantArknights#19169 · 2 条评论 ·
维护者通常 1 天内回复
-
area: certificates bug outdated-version
难度 1/5 1 小时以内 新手友好度 65/100
RafaelNGP/xbox-cloud-gaming-ps5#381 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
ROCm/AMDMIGraphX#5490 ·
维护者通常 3 天内回复