Files
seaweedfs/weed/mq/client/pub_client
Chris LuandClaude Opus 5.5 ae99aae2cb mq: report the caller's deadline when a broker sees it first (#13303)
* mq: report the caller's deadline when a broker sees it first

doConfigureTopic checked ctx.Err() to tell the caller's deadline from a
broker failure. A broker's DeadlineExceeded status (or its RST_STREAM,
which gRPC maps to DeadlineExceeded once the deadline has passed) can
arrive before the context's own timer has run, so ctx.Err() was still nil
and NewTopicPublisher returned the wrapped gRPC error instead of
context.DeadlineExceeded. Once the deadline is behind us, wait for the
context's timer before reading ctx.Err().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* mq: let the configure call start before its deadline passes in the test

The deadline the test reported had already passed when NewTopicPublisher
started, so the check before the first broker caught it and the check after
the call was never exercised. The fake broker now moves the deadline behind
us only once it has the call, and answers with its own DeadlineExceeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 12:12:07 -08:00
..