You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataMapper/Pool.hpp has a more sophisticated waiter model than any C++ peer — a single FIFO shared between sync and async waiters, three growth strategies selected at compile time — but none of the operational controls that keep a pool healthy in production.
Missing
Control
Status
Evidence
Acquire timeout
absent
Pool.hpp:269 — node->cv.wait(lock, pred), no wait_for. SqlBackup/ConnectionPool.cpp:46-53 — same. There is no wait_for/wait_until anywhere in src/Lightweight.
Validation on borrow
absent
SqlConnection::IsAlive() exists (SqlConnection.cpp:471) but no pool calls it
Idle eviction
absent
idle connections are held indefinitely
Max lifetime
absent
a connection is never proactively recycled
Retry on broken connection
absent
a dead connection is handed to the caller as-is
Consequences
A connection killed by a firewall idle timeout, a failover, or a server restart is handed to the next caller, which fails with a driver error the pool could have prevented.
An exhausted BoundedWait pool blocks the calling thread forever with no diagnostic.
Prior art
ormpp's much simpler pool does ping() on checkout and recycles at 8 hours (ormpp/connection_pool.hpp); HikariCP-class pools do all five.
DataMapper/Pool.hpphas a more sophisticated waiter model than any C++ peer — a single FIFO shared between sync and async waiters, three growth strategies selected at compile time — but none of the operational controls that keep a pool healthy in production.Missing
Pool.hpp:269—node->cv.wait(lock, pred), nowait_for.SqlBackup/ConnectionPool.cpp:46-53— same. There is nowait_for/wait_untilanywhere insrc/Lightweight.SqlConnection::IsAlive()exists (SqlConnection.cpp:471) but no pool calls itConsequences
BoundedWaitpool blocks the calling thread forever with no diagnostic.Prior art
ormpp's much simpler pool does
ping()on checkout and recycles at 8 hours (ormpp/connection_pool.hpp); HikariCP-class pools do all five.Suggested scope
Acquire(std::chrono::milliseconds timeout)returningstd::expected<PooledDataMapper, PoolError>— pairs naturally with Add deadline propagation across queries, transactions, and retries #553 (deadline propagation).IsAlive(), off by default for latency-sensitive callers.maxIdleTime/maxLifetimeinPoolConfig.Items 1 and 3 are
PoolConfigadditions, which is an NTTP, so they are source-compatible for existing users of the default config.