fix(bes): bound queued events during outages and honor BES timeout#1069
Closed
fix(bes): bound queued events during outages and honor BES timeout#1069
Conversation
Address maintainer feedback on PR #1065: 1. Bound the gRPC sink's forwarder channel by retry_max_buffer_size. Previously the Tokio mpsc was unbounded, so events accumulated freely while drive_stream was sleeping between reconnects or replaying the retry buffer — defeating the very knob meant to cap memory. The forwarder now uses try_send and signals overflow via an atomic flag; drive_stream sees the closed receiver, checks the flag, and exits with BufferFull so error_strategy applies. 2. Wire the configured timeout. RetryConfig.timeout was previously stored but never read, so 'bes_timeout' was a no-op. Wrap the sink's work in tokio::time::timeout so finite deadlines actually bound lifecycle calls, stream retries, and the final upload — matching Bazel's --bes_timeout semantics. 3. Drop the TODO about bessie authentication on the workflows BES sink: within the deployment, transport security is plain TLS.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses maintainer feedback on #1065. This branch carries the original commit from #1065 plus a follow-up commit with the fixes below.
Changes
Bound the gRPC sink's forwarder channel by
retry_max_buffer_size.The Tokio mpsc that bridges the synchronous broadcaster into the async state machine was unbounded, so events accumulated freely while
drive_streamwas sleeping between reconnects or replaying the retry buffer — defeating the very knob meant to cap memory during BES outages. The forwarder now usestry_sendagainst a bounded channel and signals overflow via an atomic flag;drive_streamobserves the closed receiver, checks the flag, and exits withBufferFullso the configurederror_strategytakes effect.Honor the configured
timeout.RetryConfig.timeoutwas being stored but never read, so thebes_timeoutknob was a no-op. The sink's work is now wrapped intokio::time::timeoutso finite deadlines actually bound lifecycle calls, stream retries, and the final upload — matching Bazel's--bes_timeoutsemantics.Drop the TODO about bessie authentication on the workflows BES sink: within the deployment, transport security is plain TLS.
Test plan
cargo test -p axl-runtime --lib(155 passed)cargo test -p axl-runtime --lib grpc(9 passed, including the three end-to-enderror_strategyscenarios)Generated by Claude Code