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
{{ message }}
Repository navigation
Commit 6757eb2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(driver-sql): give redshift its connect-timeout row so the 10s dialect bound applies (#11836)
`SqlDriver` answers three questions about a knex `client` name from three
tables. `redshift` was in `POSTGRES_WIRE_CLIENTS` (#11389 put it there for the
calendar-day parser pin) but absent from `DIALECT_CONNECT_TIMEOUT`, so
`withConnectBound` injected no `connectionTimeoutMillis` and the attempt fell
through to the strictly looser 15s `pool.createTimeoutMillis` backstop — while
the method's own docblock calls 10s "the effective bound", reached past only by
a dialect with no such knob (SQLite) or one that ignores it. Redshift is
neither: knex's `Client_Redshift extends Client_PG`, so `pg` honours the knob.
Nothing errored and nothing was logged; the bound was just 50% looser.
The row is added as a literal extension of `POSTGRES_EMIT_CLIENTS`, exactly as
`cockroachdb` already was — no table is merged, converged or restructured, and
`POSTGRES_WIRE_CLIENTS` and the dialect getters are untouched. No SQL-emission
identity is granted.
`redshift`'s absence from that table was load-bearing as documentation: the note
inside `withConnectBound` cited it as the measured reason its early return must
not skip the session pins. Adding the row retires that example, so the note is
rewritten to record the retired measurement and to carry the reasoning directly,
and the fixtures that pinned the absence are re-judged rather than respelled —
including a tripwire that goes red the moment the two memberships diverge again.
Claude-Session: https://claude.ai/code/session_01VK8rFDtg8eREaxBGX99Csn
Co-authored-by: Claude <noreply@anthropic.com>
A `redshift` datasource now gets the 10s dialect connect-timeout bound instead of silently degrading to the 15s pool backstop (#11784). `SqlDriver` answers three separate questions about a knex `client` name from three separate tables, and `redshift` was a member of the wire-protocol one (`POSTGRES_WIRE_CLIENTS`, which #11389 put it in so it gets the calendar-day parser pin) while absent from `DIALECT_CONNECT_TIMEOUT`. It reaches the server through the `pg` driver — knex's `Client_Redshift` literally `extends Client_PG` — so it has `connectionTimeoutMillis` and would have obeyed it; it just never received it, and `withConnectBound` skipped the injection. Nothing errored and nothing was logged: the bound was simply 50% looser than the method's own docblock declares ("the effective bound" at 10s, with `pool.createTimeoutMillis` a "strictly looser backstop, reached only by a dialect that has no connect-timeout knob (SQLite) or ignores the one we set"). A `redshift` host is neither of those. The practical consequence is the framework#3769 failure shape — an endpoint that accepts the TCP connection and never completes the handshake makes every query WAIT rather than fail, and the wait was bounded 5s later than declared, with knex's inaccurate "the pool is probably full" wording instead of pg's `timeout expired`. A host that sets its own `connectionTimeoutMillis` or `pool.createTimeoutMillis` is still left alone. `redshift` gains **no** SQL-emission identity from this: the connect-timeout knob is a property of the npm driver doing the connecting, not of which DDL dialect gets compiled, so this is independent of the open support-scope decision (#11756).
0 commit comments