Repository navigation
Closed
Description
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
- CONCURRENT-006 [thrift]: Cancelling the query context does not unblock a result-batch fetch already parked inside a CloudFetch cloud-storage download: the fetch stays blocked for the full download (>10s past the interrupt, against a 30s injected delay) instead of racing the download against the cancelled context, so a consumer draining results on a background goroutine has no bounded teardown.
- failing test:
TestInterruptInFlightResultBatchFetch(see the coverage PR diff undertests/)
- failing test:
Reproduce & Expected
CONCURRENT-006 — Verify that a result-stream fetch that is BLOCKED inside a slow batch fetch can be interrupted from another thread, so the blocked fetch call returns PROMPTLY with a cancellation outcome instead of w…
Reproduce:
- Each cloud-storage download stalls 30s, so the drain parks inside it.
- Execute a query whose result is delivered via CloudFetch external links, and obtain
the interrupt handle for its result stream while the stream is live. - Drain the result on a background thread/task. It blocks inside the delayed download.
- Long enough that the background fetch is inside the delayed download.
- Fire the result-stream interrupt from the main thread while the fetch is in flight,
then fire it a SECOND time to exercise idempotency. - The parked fetch call must return; measure elapsed from the interrupt.
- Fetch once more on the SAME result — must return promptly, no rows.
- Close/dispose the result and release the interrupt handle (either order) after the
cancel.
Expected (per the shared spec):
- completes without an exception
- result has exactly 0 row(s)
- result has exactly 0 row(s)
- completes without an exception
- full assertion contract:
result:
- label: interrupt_fired
no_exception: true
- label: interrupt_fired
elapsed_seconds_range:
max: 2
- label: fetch_interrupted
elapsed_seconds_range:
max: 10
- label: fetch_interrupted
reports_cancellation: true
- label: fetch_interrupted
row_count: 0
- label: repeat_fetch
elapsed_seconds_range:
max: 5
- label: repeat_fetch
row_count: 0
- label: teardown
no_exception: trueContext
- The behavior was first fixed in a DIFFERENT driver — reference PR: feat(c-abi): result-stream canceller to interrupt an in-flight next_batch (odbc#355) databricks-sql-kernel#312 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-go; the reference PR is for cross-referencing the intended behavior, NOT a change to this repo.
- Coverage PR carrying the reproducing xfail test(s): https://github.com/databricks/databricks-driver-test/pull/1534
Metadata
Metadata
Assignees
Labels
No labels
Activity
vuanhphung commentedon Sep 10, 2026
Closing because this issue was filed by redundant coverage fan-out PRs for Result-fetch cancellation, and no retained or otherwise-open coverage PR links to it. Coverage is consolidated in https://github.com/databricks/databricks-driver-test/pull/1562.