You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-ups from the round-1 review of #808 (celeris#759), none blocking; the blocking ones (new connections served during the wait, streams above a GOAWAY's last-stream-id served, response DATA waiting for WINDOW_UPDATE cut, the no-deadline floor) are fixed in #808 itself, and so is the stale engine.Engine.Shutdown doc.
std never sends an h2c connection GOAWAY, and such a connection outlives the drain.waitH2Streams (engine/std/engine.go) polls the stream count under drainCtx; nothing closes or GOAWAYs the hijacked h2c conn, so it keeps accepting new streams during the wait and after Shutdown has returned and the OnShutdown hooks have run. Under steady h2c traffic the count-based wait can use the whole budget. The part after Shutdown returns predates fix(epoll, iouring, std): graceful shutdown waits for the HTTP/2 streams on the shared worker pool, and std for its h2c streams (celeris#759) #808. Round-1 review probe on std: a stream (5) opened after "Shutdown returned after 2.005s" was served.
TestShutdownH2PoolWaitIsBounded passes on main and allows budget + 3 s (shutdown_h2_pool_linux_test.go, bound = 3 * time.Second): it only rules out an unbounded wait. A lower bound (the handler is still held when Start returns, at no less than the budget) and a tighter upper one would pin the wait itself.
Nit: the cost claim holds to about ±5 %.BenchmarkBridgeServeHTTP reported the head, which adds work, as significantly faster (-4 % to -5.5 %), so it has a bias at that level, and BenchmarkPoolDispatch's spread is ±11-22 %. The body should say "within ±5 %" rather than "no measurable cost". The GOAWAY wire test catches the m1 mutant on io_uring only some of the time (the drain-order test catches it on every native engine).
Follow-ups from the round-1 review of #808 (celeris#759), none blocking; the blocking ones (new connections served during the wait, streams above a GOAWAY's last-stream-id served, response DATA waiting for WINDOW_UPDATE cut, the no-deadline floor) are fixed in #808 itself, and so is the stale
engine.Engine.Shutdowndoc.waitH2Streams(engine/std/engine.go) polls the stream count underdrainCtx; nothing closes or GOAWAYs the hijacked h2c conn, so it keeps accepting new streams during the wait and afterShutdownhas returned and theOnShutdownhooks have run. Under steady h2c traffic the count-based wait can use the whole budget. The part afterShutdownreturns predates fix(epoll, iouring, std): graceful shutdown waits for the HTTP/2 streams on the shared worker pool, and std for its h2c streams (celeris#759) #808. Round-1 review probe on std: a stream (5) opened after "Shutdown returned after 2.005s" was served.TestShutdownH2PoolWaitIsBoundedpasses on main and allows budget + 3 s (shutdown_h2_pool_linux_test.go,bound = 3 * time.Second): it only rules out an unbounded wait. A lower bound (the handler is still held whenStartreturns, at no less than the budget) and a tighter upper one would pin the wait itself.BenchmarkBridgeServeHTTPreported the head, which adds work, as significantly faster (-4 % to -5.5 %), so it has a bias at that level, andBenchmarkPoolDispatch's spread is ±11-22 %. The body should say "within ±5 %" rather than "no measurable cost". The GOAWAY wire test catches the m1 mutant on io_uring only some of the time (the drain-order test catches it on every native engine).