Skip to content

Follow-ups from #808: std h2c conns get no GOAWAY and outlive the drain, a pool-wait bound test that passes on main, cost wording #820

Description

@FumingPower3925

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.

  1. 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.
  2. 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.
  3. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/engineEngine interface or implementationbugSomething isn't workingprotocol/h2HTTP/2 protocol

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions