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
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.
Summary
PoolConfigis missing the standard set of options thatdeadpool/bb8/r2d2users 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 —
PoolConfigexposes onlyendpoint,database,create_mode,user,password,max_size. The recycle path unconditionally runsexecute_command("SELECT 1").Original gap analysis: §6 of
docs/RUST_API_GAP_ANALYSIS.md(predecessor repo).Proposed work
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.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.recycle: RecycleStrategyenum (SelectOne,Ping,Custom(...),None) instead of hardcodedSELECT 1.ConnectionPoolmirroring the async pool's surface —r2d2-style — for sync apps. SamePoolConfig, same semantics, no Tokio dependency in the sync path.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:
Noneeverywhere (no timeout, no idle cap),recycle = SelectOne. Existing users who specify onlyendpoint/database/max_sizeshould see no change.