Make RestCatalog safe to share across threads
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 227
- Fork
- 142
- Merge trung bình
- 3 ngày 21 phút
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/iceberg-cpp
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
apache/iceberg-cpp#1103 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
apache/iceberg-cpp#1101 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Support Iceberg SQL viewsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
apache/iceberg-cpp#1099 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Complete OAuth2 token refresh and expiration support (Java-compatible)Có thể đã có người làm @lishuxu đã nhận 2 ngày trước. Đang mở
apache/iceberg-cpp#1095 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
RestCatalog: concurrent HTTP requests can crash in libcurlCó thể đã có người làm @smaheshwar-pltr đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
apache/iceberg-cpp#1089 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apache/iceberg-cpp
Issue tương tự
-
ai_p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ClickHouse/ClickHouse#130006 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DepotMaintain: EN longer string moves the hint popup buttons out of reach // WpfGUI English LanguageĐang mởclient: WpfGui module: depot question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
MaaAssistantArknights/MaaAssistantArknights#19169 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: certificates bug outdated-version
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
RafaelNGP/xbox-cloud-gaming-ps5#381 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
parse_selu lowering loses catastrophic cancellation → silent 0.0 for moderate positive inputsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ROCm/AMDMIGraphX#5490 ·
Maintainer thường phản hồi trong vòng 3 ngày