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 #803 (celeris#753), none blocking.
Overlapping Shutdown calls: the shortest budget ends the shared drain for every caller. Each caller's AfterFunc cancels drainCtx (engine/std/engine.go at 325d83a, about line 246). A caller whose own ctx is still live then gets the internal drainCtx's context.Canceled from http.Server.Shutdown(drainCtx) (the return err at about line 260), since ctx.Err() is nil for it. Before fix(std): a cancel of StartWithContext's context keeps Config.ShutdownTimeout (celeris#753) #803 the winner's budget governed. Unlikely call pattern, misleading error: return nil (or a documented error) to a caller whose own ctx has not expired, or say so in the Shutdown doc. Static reading; not run.
Nit: el < budget in engine/std/listen_cancel_budget_test.go (about lines 133-141) has a sub-microsecond theoretical margin: shutCtx is created before start is taken. Creating the context after start removes it.
Follow-ups from the round-1 review of #803 (celeris#753), none blocking.
Shutdowncalls: the shortest budget ends the shared drain for every caller. Each caller'sAfterFunccancelsdrainCtx(engine/std/engine.go at 325d83a, about line 246). A caller whose own ctx is still live then gets the internaldrainCtx'scontext.Canceledfromhttp.Server.Shutdown(drainCtx)(thereturn errat about line 260), sincectx.Err()is nil for it. Before fix(std): a cancel of StartWithContext's context keeps Config.ShutdownTimeout (celeris#753) #803 the winner's budget governed. Unlikely call pattern, misleading error: return nil (or a documented error) to a caller whose own ctx has not expired, or say so in theShutdowndoc. Static reading; not run.engine.Engine.Shutdown's doc at fix(std): a cancel of StartWithContext's context keeps Config.ShutdownTimeout (celeris#753) #803's head says "No engine closes a connection whose handler is still running when ctx expires; the handler runs to completion". That is false on epoll, io_uring and adaptive for an HTTP/2 stream on the shared worker pool (celeris#759). 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 (which carries fix(std): a cancel of StartWithContext's context keeps Config.ShutdownTimeout (celeris#753) #803) rewrites the doc; if fix(std): a cancel of StartWithContext's context keeps Config.ShutdownTimeout (celeris#753) #803 merges alone, the sentence stays wrong until 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 does.el < budgetinengine/std/listen_cancel_budget_test.go(about lines 133-141) has a sub-microsecond theoretical margin:shutCtxis created beforestartis taken. Creating the context afterstartremoves it.