[AWS] improve S3 input states copy by only storing filtered entries#41869
Merged
Kavindu-Dodan merged 2 commits intoelastic:mainfrom Dec 3, 2024
Merged
Conversation
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
20a8edf to
e6296f6
Compare
6 tasks
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
e6296f6 to
f128cf0
Compare
kaiyan-sheng
reviewed
Dec 3, 2024
Contributor
kaiyan-sheng
left a comment
There was a problem hiding this comment.
The change looks good. Just one question: if we have two s3 input running, one with prefix A and one without any prefix. Will the state be missing entries?
Contributor
Author
No, there won't be missing entries. The prefixed input store will store and handle entries with prefixes. The non-prefixed input will maintain all entries, including prefixed ones. This holds even when restarting/upgrading, pointing to the same registry. |
kaiyan-sheng
approved these changes
Dec 3, 2024
faec
approved these changes
Dec 3, 2024
mergify bot
pushed a commit
that referenced
this pull request
Dec 3, 2024
…41869) * s3 state imporvement with prefix filtering Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 91070bf)
Merged
6 tasks
Kavindu-Dodan
added a commit
that referenced
this pull request
Dec 4, 2024
…41869) (#41883) * s3 state imporvement with prefix filtering Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 91070bf) Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
mergify bot
pushed a commit
that referenced
this pull request
Dec 5, 2024
…41869) * s3 state imporvement with prefix filtering Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 91070bf)
Merged
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Dec 5, 2024
…41869) * s3 state imporvement with prefix filtering Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 91070bf)
Merged
6 tasks
Kavindu-Dodan
added a commit
that referenced
this pull request
Dec 6, 2024
…oring filtered entries (#41922) * [AWS] improve S3 input states copy by only storing filtered entries (#41869) * s3 state imporvement with prefix filtering Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 91070bf) * Update CHANGELOG.next.asciidoc --------- Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Kavindu-Dodan
added a commit
that referenced
this pull request
Dec 6, 2024
…oring filtered entries (#41921) * [AWS] improve S3 input states copy by only storing filtered entries (#41869) * s3 state imporvement with prefix filtering Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add changelog entry Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> (cherry picked from commit 91070bf) * Update CHANGELOG.next.asciidoc --------- Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
This was referenced Dec 6, 2024
Merged
Merged
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
Improves S3 polling mode state registry copy by considering the
bucket_list_prefixusage. Before this change, input stored all registry entries loaded from the underlying registry (ex:- when storing, restarting beats or upgrading while pointing to the same registry). With this improvement, whenbucket_list_prefixis used, the state registry copy only holds entries matching the given prefix.This improvement benefits the state registry clean-up planned through #41694. Further, when beats restart, this change improves the input-specific state copy memory usage by only storing relevant entries, matching the configured prefix.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
None - this change only concerns the input-specific copy of the registry entries
How to test this PR locally
Requires a build and S3 bucket entries with prefixes.
Related issues
#39116
Footnotes
https://github.com/Kavindu-Dodan/data-gen ↩