Connection pool ergonomics: timeouts, idle/lifetime caps, sync pool
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 3
- Forks
- 2
- Merge medio
- 23 h 11 min
- PR fusionados (30 d)
- 65
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tableau/hyper-api-rust
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tableau/hyper-api-rust#294 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
tableau/hyper-api-rust#311 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
tableau/hyper-api-rust#305 ·
Los mantenedores suelen responder en 1 día
-
Windows Named Pipe: verify DACL denies other users, and measure read-path perf for MCP workloadsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
tableau/hyper-api-rust#302 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
tableau/hyper-api-rust#300 ·
Los mantenedores suelen responder en 1 día
Todos los issues de tableau/hyper-api-rust
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zcashlabs/thus-spoke-zakura#153 ·
Los mantenedores suelen responder en 1 día
-
claude_code: step fails on session-scoped (`@inline`) plugins with `Invalid scope "session"`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
topgrade-rs/topgrade#2395 ·
Los mantenedores suelen responder en 1 día
-
app bug windows-os
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Improve sublime text syntaxAbiertoeditor good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
funnyboy-roks/inq#54 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pnpm/pnpm#16635 · 1 comentario ·
Los mantenedores suelen responder en 1 día