[8.17](backport #41869) [AWS] improve S3 input states copy by only storing filtered entries #41922
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_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
This is an automatic backport of pull request #41869 done by [Mergify](https://mergify.com).
Footnotes
https://github.com/Kavindu-Dodan/data-gen ↩