[coverage] Conformance findings: CLOUDFETCH-018

Offen
#945 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
database

Rechercherichtung

Beginne mit dem xfail-Test test_link_fetch_failure_surfaces_terminal_error im Coverage-PR-Diff unter tests/ und vergleiche dann das beabsichtigte Verhalten mit Referenz-PR #322. Führe das Protokollszenario mit einem Ergebnis in mehreren Chunks und einem persistenten Thrift-Fehler bei FetchResults aus. Fertig ist die Aufgabe, wenn der erste Drain innerhalb von 180 Sekunden eine Exception auslöst und ein wiederholter Drain umgehend mit einem Fehler oder dem Ende des Datenstroms zurückkehrt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-python. 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-python) is fixed, then flips green as a tripwire.

Findings

  • CLOUDFETCH-018 [thrift]: A permanently-failing CloudFetch link fetch (Thrift FetchResults) never surfaces a terminal error: the drain hangs indefinitely (>180s) instead of failing, stranding the application thread. The link fetch fails before any per-chunk state exists, so error handling keyed on per-chunk download/processing state never records the failure or wakes waiters (same class as kernel #319 / audit finding H03).
    • failing test: test_link_fetch_failure_surfaces_terminal_error (see the coverage PR diff under tests/)

Reproduce & Expected

CLOUDFETCH-018 — A permanently-failing CloudFetch LINK FETCH must surface a TERMINAL error to the consumer, and must do so in bounded time.

Reproduce:

  • Enable this run's protocol scenario (see protocol_scenarios above) so the
    link-fetch call fails persistently. The result must be large enough to span
    MULTIPLE chunks, so the driver has to ask for links it does not already hold --
    otherwise every link arrives inline, no link fetch is issued, and the injected
    failure never fires (the protocol guard below catches that vacuous case).
  • Drain a multi-chunk CloudFetch result whose link fetch fails permanently.
    Expect the drain to raise -- not to block, and not to report a clean
    end-of-stream over a truncated row set.
  • Fetch again on the SAME result after the terminal error. Must return promptly
    (end-of-stream or the same error), not hang.

Expected (per the shared spec):

  • full assertion contract:
result:
- label: first_drain
  exception_thrown: true
- label: first_drain
  elapsed_seconds_range:
    max: 180
- label: repeat_drain
  either_condition_true:
  - row_count: 0
  - exception_thrown: true
- label: repeat_drain
  elapsed_seconds_range:
    max: 30
protocol:
  thrift:
  - label: first_drain
    call_min:
      method: FetchResults
      min: 1
  sea:
  - label: first_drain
    call_min:
      operation: FetchResultChunk
      min: 1

Context

Vorherrschende Sprache
Python
Sterne
233
Forks
152
Ø Merge
21 Std. 5 Min.
Gemergte PRs (30 T.)
10

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus databricks/databricks-sql-python

Alle Issues in databricks/databricks-sql-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.