[coverage] Conformance findings: CLOUDFETCH-018

Aperta
#945 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
database

Direzione di ricerca

Inizia con il test xfail test_link_fetch_failure_surfaces_terminal_error nel diff della PR di coverage sotto tests/, quindi confronta il comportamento previsto con la PR di riferimento #322. Esegui lo scenario del protocollo con un risultato suddiviso in più chunk e un errore persistente di Thrift per FetchResults. L’attività è completata quando il primo drain solleva un’eccezione entro 180 secondi e un drain ripetuto restituisce rapidamente un errore o la fine del flusso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
233
Fork
152
Merge medio
21h 5m
PR unite (30g)
10

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/databricks-sql-python

Tutte le issue di databricks/databricks-sql-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.