Connection pool ergonomics: timeouts, idle/lifetime caps, sync pool
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with hyperdb-api/src/pool.rs and §6 of docs/RUST_API_GAP_ANALYSIS.md to map the existing async pool and PoolConfig surface. Define the additive timeout, lifetime, idle, min-idle, and recycle options, then assess the sync ConnectionPool boundary and its lack of a Tokio dependency. Done means the listed options and sync pool are implemented with current defaults preserved, with tests covering timeout, idle-close, and health-check replacement behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
PoolConfig is missing the standard set of options that deadpool / bb8 / r2d2 users expect (timeouts, idle/lifetime caps, min-idle, configurable health check). And there is no sync connection pool at all — pooling is async-only. Users with a sync app today either roll their own pool or block on the async one from a runtime.
Current state
hyperdb-api/src/pool.rs — PoolConfig exposes only endpoint, database, create_mode, user, password, max_size. The recycle path unconditionally runs execute_command("SELECT 1").
$ grep -n "wait_timeout\|create_timeout\|recycle_timeout\|max_lifetime\|idle_timeout\|min_idle" \
hyperdb-api/src/pool.rs
# (no output)
Original gap analysis: §6 of docs/RUST_API_GAP_ANALYSIS.md (predecessor repo).
Proposed work
- Add timeouts to
PoolConfig:-
wait_timeout: Option<Duration>— how longacquirewill block before erroring. -
create_timeout: Option<Duration>— bound on a singleConnection::connect. -
recycle_timeout: Option<Duration>— bound on the health-check round-trip.
-
- Add lifetime/idle caps:
-
max_lifetime: Option<Duration>— connection is closed when older than this. -
idle_timeout: Option<Duration>— idle connection is closed after this duration. -
min_idle: Option<u32>— pool keeps at least this many warm.
-
- Pluggable health-check strategy: a
recycle: RecycleStrategyenum (SelectOne,Ping,Custom(...),None) instead of hardcodedSELECT 1. - Add a sync
ConnectionPoolmirroring the async pool's surface —r2d2-style — for sync apps. SamePoolConfig, same semantics, no Tokio dependency in the sync path. - Tests covering each new option (timeout fires, idle close fires, health-check failure replaces the connection).
Backwards compatibility
Purely additive — new optional fields default to None (current behavior preserved). New sync pool is a new public type.
Performance note
The defaults must keep current behavior identical: None everywhere (no timeout, no idle cap), recycle = SelectOne. Existing users who specify only endpoint/database/max_size should see no change.
- Ngôn ngữ chính
- Rust
- Star
- 3
- Fork
- 2
- Merge trung bình
- 23 giờ 11 phút
- Pull request đã merge (30 ngày)
- 65
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 tableau/hyper-api-rust
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/hyper-api-rust#294 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
tableau/hyper-api-rust#311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
tableau/hyper-api-rust#305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows Named Pipe: verify DACL denies other users, and measure read-path perf for MCP workloadsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
tableau/hyper-api-rust#302 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
tableau/hyper-api-rust#300 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của tableau/hyper-api-rust
Issue tương tự
-
C-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rust-lang/rust-analyzer#23501 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug P2 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/rust-sdk#1339 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
French BIP39 wordlist starts with a UTF-8 BOM, so generated French mnemonics carry U+FEFF and derive a non-canonical seedCó thể đã có người làm @Kshot3000 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
ergoplatform/sigma-rust#976 ·
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 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Web chat input doesn't regain focus after a reply finishesCó thể đã có người làm @GaijinSystems đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zeroclaw-labs/zeroclaw#11658 ·
Maintainer thường phản hồi trong vòng 2 ngày