Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-go. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-go) is fixed, then flips green as a tripwire.
Findings
- SESSION-017 [thrift]: Ping (driver.Pinger) on a CLOSED connection still probes the server: it submits
select 1 on the disposed session handle (rejected INVALID_STATE: Invalid SessionHandle) instead of the spec's zero round trips, so post-close validity polling costs a doomed round-trip per poll (PECOBLR-2093)
- failing test:
TestActiveConnectionValidationProbesTheServer (see the coverage PR diff under tests/)
- SESSION-017: Ping (driver.Pinger) has no local closed-session guard: a connection-validity check on a CLOSED connection still submits the
select 1 test query on the disposed session handle (server rejects with INVALID_STATE: Invalid SessionHandle), so validity polling after close costs a doomed server round-trip per poll instead of the spec's zero round trips; the thrift backend is affected, the kernel/SEA backend correctly short-circuits locally (PECOBLR-2093 / PECOBLR-2197)
Reproduce & Expected
SESSION-017 — Validates the ACTIVE side of connection validation: when active connection testing is ENABLED, the driver's "is this connection still usable?" check performs a real, lightweight server round-trip (a…
Reproduce:
- Fresh, reachable connection with active connection validation enabled
- Baseline before the check, so session-open traffic is not miscounted as
the probe.
- Ask the driver whether the connection is still usable, via its own entry
point (SQLGetConnectAttr(SQL_ATTR_CONNECTION_DEAD) / isValid(30) /
PingContext). With active validation enabled this must round-trip the
SELECT 1 test query to the server.
- Close the connection (CloseSession / DeleteSession)
- Baseline again, so the close traffic is not counted below
- The same check on the now-closed connection
Expected (per the shared spec):
- completes without an exception
- [thrift] exactly 0
ExecuteStatement call(s)
- [sea] exactly 0
ExecuteStatement call(s)
- full assertion contract:
result:
- connection_reported_alive: true
label: while_live
description: "A fresh, reachable connection is reported ALIVE even though the check\n\
actively probed the server \u2014 the probe succeeded.\n"
- connection_reported_dead: true
label: after_close
description: 'After close the same check reports DEAD/invalid. The DELIVERY of that
answer is surface-specific and not constrained here: a returned flag
(ODBC SQL_CD_TRUE, JDBC isValid() == false) and a raised
closed/invalid-handle error (Go''s Ping on a closed conn) both satisfy it.
The contract is "not reported alive", not the mechanism.
'
- no_exception: true
label: while_live
description: On a live connection the validity check itself never throws.
protocol:
thrift:
- call_min:
method: ExecuteStatement
min: 1
label: while_live
- call_count:
method: ExecuteStatement
expected: 0
label: after_close
sea:
- call_min:
operation: ExecuteStatement
min: 1
label: while_live
- call_count:
operation: ExecuteStatement
expected: 0
label: after_close
Context
Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-go. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-go) is fixed, then flips green as a tripwire.
Findings
select 1on the disposed session handle (rejected INVALID_STATE: Invalid SessionHandle) instead of the spec's zero round trips, so post-close validity polling costs a doomed round-trip per poll (PECOBLR-2093)TestActiveConnectionValidationProbesTheServer(see the coverage PR diff undertests/)select 1test query on the disposed session handle (server rejects with INVALID_STATE: Invalid SessionHandle), so validity polling after close costs a doomed server round-trip per poll instead of the spec's zero round trips; the thrift backend is affected, the kernel/SEA backend correctly short-circuits locally (PECOBLR-2093 / PECOBLR-2197)Reproduce & Expected
SESSION-017 — Validates the ACTIVE side of connection validation: when active connection testing is ENABLED, the driver's "is this connection still usable?" check performs a real, lightweight server round-trip (a…
Reproduce:
the probe.
point (SQLGetConnectAttr(SQL_ATTR_CONNECTION_DEAD) / isValid(30) /
PingContext). With active validation enabled this must round-trip the
SELECT 1test query to the server.Expected (per the shared spec):
ExecuteStatementcall(s)ExecuteStatementcall(s)Context