fix: AWS S3 improve unexpected EOF detection#44813
Merged
Kavindu-Dodan merged 4 commits intoelastic:mainfrom Jun 16, 2025
Merged
fix: AWS S3 improve unexpected EOF detection#44813Kavindu-Dodan merged 4 commits intoelastic:mainfrom
Kavindu-Dodan merged 4 commits intoelastic:mainfrom
Conversation
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
effda78 to
0c78399
Compare
gizas
reviewed
Jun 16, 2025
gizas
reviewed
Jun 16, 2025
gizas
approved these changes
Jun 16, 2025
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
0c78399 to
7f07023
Compare
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Contributor
Author
|
Merging by EOD 16.05.20205 |
Contributor
|
@Mergifyio backport 8.17 8.18 8.19 9.0 |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Jun 16, 2025
* improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7)
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Jun 16, 2025
* improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7)
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Jun 16, 2025
* improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7)
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Jun 16, 2025
* improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7)
6 tasks
Kavindu-Dodan
added a commit
that referenced
this pull request
Jun 16, 2025
* improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7)
Kavindu-Dodan
added a commit
that referenced
this pull request
Jun 16, 2025
…44847) * fix: AWS S3 improve unexpected EOF detection (#44813) * improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7) * Update CHANGELOG.next.asciidoc * fix import Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com> Co-authored-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Kavindu-Dodan
added a commit
that referenced
this pull request
Jun 16, 2025
…44848) * fix: AWS S3 improve unexpected EOF detection (#44813) * improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7) * Update CHANGELOG.next.asciidoc * fix import Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com> Co-authored-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Kavindu-Dodan
added a commit
that referenced
this pull request
Jun 16, 2025
…44850) * fix: AWS S3 improve unexpected EOF detection (#44813) * improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7) * Update CHANGELOG.next.asciidoc * fix import Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com> Co-authored-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Kavindu-Dodan
added a commit
that referenced
this pull request
Jun 17, 2025
…44849) * fix: AWS S3 improve unexpected EOF detection (#44813) * improve unexpected EOF detection Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix lint issues Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review: receiver name Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit a75b4e7) * Update CHANGELOG.next.asciidoc * fix import Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com> Co-authored-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
6 tasks
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.
Proposed commit message
This PR revisits the implementation introduced in #42420 and improves the detection of
io.ErrUnexpectedEOF.The
io.ErrUnexpectedEOFerror can occur while streaming the S3 object body. The previous approach relied on reading the entire body into memory usingio.Copywhich unfortunately led to increased memory usage in Beats deployments.This change introduces a wrapper around
io.Readerto catch and handleio.ErrUnexpectedEOF. This allows us to handle stream errors (retriable) and content parsing errors (non-retriable) separately.Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Related issues
Fixes #44735