Skip to content

fetch: abort the request when the response body reader is cancelled - #33231

Merged
Jarred-Sumner merged 10 commits into
mainfrom
farm/469333cb/fetch-reader-cancel-abort
Jul 4, 2026
Merged

fetch: abort the request when the response body reader is cancelled#33231
Jarred-Sumner merged 10 commits into
mainfrom
farm/469333cb/fetch-reader-cancel-abort

test: update backpressure cancel test for the abort-on-cancel behavior

db50342
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 2, 2026 in 28m 49s

Code review found 1 potential issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/web/fetch/fetch-backpressure.test.ts:314-317 toBeLessThan(2*TOTAL) may flake on large-kernel-buffer CI hosts

Annotations

Check warning on line 317 in test/js/web/fetch/fetch-backpressure.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

toBeLessThan(2*TOTAL) may flake on large-kernel-buffer CI hosts

This assertion depends on the 16 MiB body being large enough that the server's `push()` loop blocks before finishing — but the sibling test just above (line 232) documents that some CI hosts have `tcp_rmem[2]+tcp_wmem[2]` approaching 256 MiB and uses a 1 GiB body for exactly that reason. On those hosts the server writes all 16 MiB into kernel buffers during the 50 ms stall, req 1 contributes `TOTAL`, req 2 adds `TOTAL`, and `toBeLessThan(2 * TOTAL)` fails with equality. Since the abort-vs-drain