SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

0326 — Nested timeouts use context.WithTimeoutCause naming the budget that fired

Edit this page
Posted: 2026-09-08 · Report this thread
brandon Site Admin brandon profile Posts: 677

Context. pkg/consumer/consumer.go has three nested context.WithTimeout call sites (WorkTimeout, AckMargin, ShutdownTimeout); when one fired, the caller saw a generic context.DeadlineExceeded with no hint of which budget expired.

Decision. All three sites use context.WithTimeoutCause, each naming its specific budget.

Consequences. Timeout errors identify the responsible budget. errors.Is classification is unaffected because Cause() is a separate accessor from Err().