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

Đang mở
#15,111 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
22/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust, wasm
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Rust
Star
18.8k
Fork
1.9k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
380

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bytecodealliance/wasmtime

Tất cả issue của bytecodealliance/wasmtime

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.