Repository navigation
fix(aws_s3_stream): retry part uploads triggered by max_buffer_period - #1192
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pcbeingused333
requested review from
gregfurman and
jem-davies
as code owners
November 26, 2026 23:51
This branch has not been deployed
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.
Root cause
When a buffer of at least 5 MiB sits for longer than
max_buffer_period, the timer uploads it withforceFlush. That makes a singleUploadPartattempt with no backoff, and on failure it aborts the multipart upload. The returned error is discarded, so the buffered data of already-acknowledged messages is lost with the aborted upload, and the writer keeps the dead upload ID.Fix
The timer path now calls
flush, the same routine the size and count triggers use: it retries the same part number with the configured backoff and only aborts once retries are exhausted.forceFlushis now only used for the final part inClose.What happens after all retries fail is unchanged (the upload is still aborted, and the timer path has no caller to report to).
Tests
Added
TestS3StreamingWriterTimerFlushRetriesFailedPart, where the first timer-triggeredUploadPartfails. Before the change the upload is aborted; after it, part 1 is retried and the upload completes with no abort. TheS3StreamingWriterunit tests andgo veton the package pass. Integration tests andmake lintwere not run. CHANGELOG updated.This contribution was prepared with the assistance of an AI coding tool (Claude Code).