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
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-kernel.
Each is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT behavior and stays red until this driver is fixed.
ERRORRECOV-013: kernel does not retry transient transport-level failures on ExecuteStatement (NonIdempotent: retries only 429/503-with-Retry-After), so a transport error propagates un-retried instead of recovering
Investigated — the kernel's current behavior is already correct under its idempotency policy
I traced ERRORRECOV-013 and probed both the reference behavior and the actual reqwest error semantics. The finding, as the coverage tripwire encodes it, asks the kernel to retry a case it deliberately does not — so this is an already-correct / spec-divergence outcome rather than a kernel bug.
What the tripwire actually exercises
The coverage proxy simulates the transport failure with close_connection — a mid-flight TCP close, after the ExecuteStatement request bytes are already on the wire. Verified empirically against reqwest 0.12:
scenario
is_connect()
is_request()
reached server?
mid-flight close (this tripwire)
false
true
ambiguous — bytes already sent
connection refused (never reached server)
true
true
no
is_request() is reqwest's catch-all "error sending request" bucket (true for both cases); is_connect() is the discriminating predicate — true only when the connection could not be established, i.e. the request provably never reached the server.
Why the kernel does not retry the mid-flight case
ExecuteStatement is classified NonIdempotent (retrying could double-execute a non-idempotent statement like an INSERT). The kernel already retries the provably-safe is_connect() transport failures on ExecuteStatement (src/client/retry.rs, RetryStrategy::is_retryable_error). A mid-flight close (is_request(), !is_connect()) is exactly as ambiguous as a 503 without a Retry-After header — the server may have already received and started executing the statement — so retrying it risks silent double-execution.
The reference C# driver (adbc-drivers/databricks#373) accepts that double-execution risk to match JDBC's socketTimeout behavior (and relies on a per-request timeout to detect half-open connections, which this kernel does not have). This kernel takes the conservative, safety-first stance instead: retry only transport failures that provably never reached the server.
Recommendation
No kernel change. I suggest the shared conformance spec treat transport-error retry on non-idempotent ExecuteStatement as driver-discretionary (drivers may reasonably choose the safety-first stance), rather than asserting the JDBC/ADBC behavior as the single correct one. Happy to discuss if the fleet wants the kernel to adopt the riskier retry behavior explicitly.
(The sibling finding ERRORRECOV-014 / #214 was a genuine bug — a retry_max_wait < retry_min_wait panic — and is fixed in #233.)
Closing as not planned: the kernel's current behavior is correct under its safety-first idempotency policy (details in the comment above). #185 requires retrying an ambiguous mid-flight transport failure that risks double-executing non-idempotent SQL on ExecuteStatement — which the kernel deliberately declines, unlike the C#/JDBC reference. Recommend the shared conformance spec treat transport-error retry on non-idempotent ExecuteStatement as driver-discretionary. Reopen if the fleet decides the kernel should adopt the riskier retry behavior explicitly.
(The sibling finding #214 was a genuine panic bug and is fixed in #233.)
Activity
vikrantpuppala commentedon Aug 10, 2026
Investigated — the kernel's current behavior is already correct under its idempotency policy
I traced ERRORRECOV-013 and probed both the reference behavior and the actual reqwest error semantics. The finding, as the coverage tripwire encodes it, asks the kernel to retry a case it deliberately does not — so this is an already-correct / spec-divergence outcome rather than a kernel bug.
What the tripwire actually exercises
The coverage proxy simulates the transport failure with
close_connection— a mid-flight TCP close, after theExecuteStatementrequest bytes are already on the wire. Verified empirically against reqwest 0.12:is_connect()is_request()is_request()is reqwest's catch-all "error sending request" bucket (true for both cases);is_connect()is the discriminating predicate — true only when the connection could not be established, i.e. the request provably never reached the server.Why the kernel does not retry the mid-flight case
ExecuteStatementis classifiedNonIdempotent(retrying could double-execute a non-idempotent statement like anINSERT). The kernel already retries the provably-safeis_connect()transport failures onExecuteStatement(src/client/retry.rs,RetryStrategy::is_retryable_error). A mid-flight close (is_request(),!is_connect()) is exactly as ambiguous as a503without aRetry-Afterheader — the server may have already received and started executing the statement — so retrying it risks silent double-execution.The reference C# driver (adbc-drivers/databricks#373) accepts that double-execution risk to match JDBC's
socketTimeoutbehavior (and relies on a per-request timeout to detect half-open connections, which this kernel does not have). This kernel takes the conservative, safety-first stance instead: retry only transport failures that provably never reached the server.Recommendation
No kernel change. I suggest the shared conformance spec treat transport-error retry on non-idempotent
ExecuteStatementas driver-discretionary (drivers may reasonably choose the safety-first stance), rather than asserting the JDBC/ADBC behavior as the single correct one. Happy to discuss if the fleet wants the kernel to adopt the riskier retry behavior explicitly.(The sibling finding ERRORRECOV-014 / #214 was a genuine bug — a
retry_max_wait < retry_min_waitpanic — and is fixed in #233.)vikrantpuppala commentedon Aug 10, 2026
Closing as not planned: the kernel's current behavior is correct under its safety-first idempotency policy (details in the comment above). #185 requires retrying an ambiguous mid-flight transport failure that risks double-executing non-idempotent SQL on
ExecuteStatement— which the kernel deliberately declines, unlike the C#/JDBC reference. Recommend the shared conformance spec treat transport-error retry on non-idempotentExecuteStatementas driver-discretionary. Reopen if the fleet decides the kernel should adopt the riskier retry behavior explicitly.(The sibling finding #214 was a genuine panic bug and is fixed in #233.)