Skip to content

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

Merged
Kavindu-Dodan merged 2 commits into8.17from
mergify/bp/8.17/pr-41869
Dec 6, 2024
Merged

[8.17](backport #41869) [AWS] improve S3 input states copy by only storing filtered entries#41922
Kavindu-Dodan merged 2 commits into8.17from
mergify/bp/8.17/pr-41869

Conversation

@mergify
Copy link
Copy Markdown
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:24
@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 the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Dec 5, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 5, 2024
@Kavindu-Dodan Kavindu-Dodan enabled auto-merge (squash) December 5, 2024 22:40
@Kavindu-Dodan Kavindu-Dodan merged commit 5531728 into 8.17 Dec 6, 2024
@Kavindu-Dodan Kavindu-Dodan deleted the mergify/bp/8.17/pr-41869 branch December 6, 2024 00:05
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