Skip to content
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

[8.16](backport #41869) [AWS] improve S3 input states copy by only storing filtered entries #41921

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 5, 2024

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, when bucket_list_prefix is used, the state registry copy only holds entries matching the given prefix.

image

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

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-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.

  • Generate a mix of S3 bucket entries with prefixes and without. You may use data gen tool 1
  • Build filebeat from this branch & configure multiple inputs with prefixes
  • Observe state registry filling at startup. You may first run without a prefix to store all entries and later restart beats to observe the loading behavior

Related issues

#39116


This is an automatic backport of pull request #41869 done by [Mergify](https://mergify.com).

Footnotes

  1. https://github.com/Kavindu-Dodan/data-gen

…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)
@mergify mergify bot added the backport label Dec 5, 2024
@mergify mergify bot requested a review from a team as a code owner December 5, 2024 22:22
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 5, 2024
@Kavindu-Dodan Kavindu-Dodan added Team:obs-ds-hosted-services Label for the Observability Hosted Services team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Dec 5, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@Kavindu-Dodan Kavindu-Dodan enabled auto-merge (squash) December 5, 2024 22:40
@Kavindu-Dodan Kavindu-Dodan merged commit d0c8b9f into 8.16 Dec 6, 2024
22 checks passed
@Kavindu-Dodan Kavindu-Dodan deleted the mergify/bp/8.16/pr-41869 branch December 6, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants