-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AWS] improve S3 input states copy by only storing filtered entries #41869
[AWS] improve S3 input states copy by only storing filtered entries #41869
Conversation
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
20a8edf
to
e6296f6
Compare
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
e6296f6
to
f128cf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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. |
…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)
…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>
…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)
…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)
…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>
…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>
Proposed commit message
Improves S3 polling mode state registry copy by considering the
bucket_list_prefix
usage. 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_prefix
is 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.asciidoc
orCHANGELOG-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 ↩