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

Abierto
#15,111 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
22/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust, wasm
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Rust
Estrellas
18.8k
Forks
1.9k
Merge medio
1 d 3 h
PR fusionados (30 d)
380

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bytecodealliance/wasmtime

Todos los issues de bytecodealliance/wasmtime

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.