wasi-http: the caller-drop TODOs in handler.rs contradict worker reuse

Aperta
#15,111 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
22/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust, wasm
Ambito
backend

Direzione di ricerca

The two TODOs sit in crates/wasi-http/src/handler.rs, around the p3 and p2 sections, and they suggest expiring a request when the caller drops the response future. Read the linked pr14625.rs reproducers in crates/wasi-http/tests/all/ and check that they pass on main before proposing text. Done means a maintainer has chosen between removing the TODOs and rewording them to point at #11833, and the comments match what the code does. Expect to wait for that decision before editing.

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

Descrizione

wasi-http

handler.rs has two TODOs (p3, p2) suggesting we expire a request when the caller drops the response future.

I tried that in #14625 and it was closed: it breaks worker reuse. Two cases that pass on main and failed with the change:

  • p2: the caller drops after the guest has already responded; expiring the request ends up killing the reused worker and truncating an unrelated in-flight response.
  • p3: every abandoned request retires its instance, so instances stop being reused.

Reproducers from @rvolosatovs's review branch: https://github.com/rvolosatovs/wasmtime/blob/6131efe89c969c471a8796af65607e0846d07707/crates/wasi-http/tests/all/pr14625.rs (they pass on main).

So the TODOs point at a behavior that conflicts with what the code does today. Should they be removed, or reworded to say "revisit once task cancellation (#11833) is available"?

cc @rvolosatovs

Lingua principale
Rust
Stelle
18.8k
Fork
1.9k
Merge medio
1g 3h
PR unite (30g)
380

Preparare l'ambiente

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 bytecodealliance/wasmtime

Tutte le issue di bytecodealliance/wasmtime

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.