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分
- マージ済み PR(30日)
- 70
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 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 日以内に返信