Skip to content

[coverage] Conformance findings: ERRORRECOV-013 #185

Closed as not planned
Closed as not planned

Description

@oss-engineer-bot

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

Reference driver PR: adbc-drivers/databricks#373
Coverage PR (reproducing xfail tests): https://github.com/databricks/databricks-driver-test/pull/895

Activity

  1. vikrantpuppala commented on Aug 10, 2026

    @vikrantpuppala
    Collaborator

    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.)

  2. vikrantpuppala commented on Aug 10, 2026

    @vikrantpuppala
    Collaborator

    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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions