fix(bes): keep the stream alive through long replays and slow drains - #1344
Conversation
Aspect Workflows Tasks📅 Wed Sep 2 02:12:13 UTC 2026 Task Results
⏱ Last updated Wed Sep 2 02:21:25 UTC 2026 · 📊 GitHub API quota 0/15,000 (0% used, resets in 59m) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d16622162
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
This has some conflicts. |
8d16622 to
e3cf514
Compare
A reconnect replays every retained event before resuming the live stream. That loop never reads the response side, so on a large buffer the server's flow-control window fills, it stops reading requests, and the replay trips `send_stall_timeout` — reconnecting into the same wall each time. Acks are now drained as they arrive and applied once the loop releases its borrow of the buffer; the handful of extra replayed events that costs are deduped by sequence number server-side. Separately, half-close held a flat 30s to drain whatever was outstanding. That deadline is a budget for *silence*, not for how long a drain may take: a build that ends holding a large unacked backlog, against a backend acking steadily but slower than 30s, gets its stream torn down and fully replayed at the end of the build. It is now pushed out on every ack. Draining to empty already exits, so only a backend that has actually gone quiet spends it, and the 30s bound against a silent one is unchanged. Both paths got more exposed with #1353, which replaced the 10,000-event cap with a 256 MiB byte budget — the replay these guard is now up to two orders of magnitude larger. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
c44a27e to
072de45
Compare
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Prevent BES uploads from timing out while making progress:
visible to end-users: yes
docs: no
breaking change: no
release notes: yes