DBIO-MySQL-Async
view release on metacpan or search on metacpan
docs/adr/0006-accessbroker-conninfo-provider-credential-rotation.md view on Meta::CPAN
`pool_size` normalization in one method, called by both the provider and the static
path, keeps the broker and non-broker cases producing identically-shaped conninfo
and keeps `_conninfo_hash` off the hot path.
This is shipped and unit-tested (`t/02-access-broker.t` exercises the broker wiring
without a live DB; `t/11-access-broker-live.t` against a real server), hence
**accepted**, not proposed.
## Consequences
- Broker-backed pools rotate credentials transparently: each new pooled connection
is built from freshly-fetched, freshly-normalized broker credentials, with no
pool teardown. Existing live connections are unaffected until they are recycled.
- The pool is handed a *coderef* in the broker case and a *value* in the non-broker
case (`Storage.pm:152-157`). The pool's connection creation must keep calling the
provider per connection (PoolBase contract); a change there that cached the first
result would silently defeat rotation.
- All conninfo normalization (`dbname`â`database`, `pool_size` extraction) happens
once in `_normalize_async_connect_info`; `_conninfo_hash` assumes its input is
already normalized. A new normalization rule must go in that one method or the
broker and static paths will drift.
( run in 0.975 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )