From f47cbd61321464f07f3edc678b4bc4b7d6f1d5e1 Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Fri, 4 Oct 2024 08:31:10 -0600 Subject: [PATCH] Missing backup and delete for AWS S3 polling mode (#41071) --- CHANGELOG.next.asciidoc | 1 + x-pack/filebeat/input/awss3/s3_input.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 92464dcdb0c..21e69a661b0 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -169,6 +169,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - Ensure netflow custom field configuration is applied. {issue}40735[40735] {pull}40730[40730] - Fix replace processor handling of zero string replacement validation. {pull}40751[40751] - Fix long filepaths in diagnostics exceeding max path limits on Windows. {pull}40909[40909] +- Add backup and delete for AWS S3 polling mode feature back. {pull}41071[41071] - Fix a bug in Salesforce input to only handle responses with 200 status code {pull}41015[41015] diff --git a/x-pack/filebeat/input/awss3/s3_input.go b/x-pack/filebeat/input/awss3/s3_input.go index 999b27da534..bd1e8f7700e 100644 --- a/x-pack/filebeat/input/awss3/s3_input.go +++ b/x-pack/filebeat/input/awss3/s3_input.go @@ -172,6 +172,10 @@ func (in *s3PollerInput) workerLoop(ctx context.Context, workChan <-chan *s3Fetc // Metrics in.metrics.s3ObjectsAckedTotal.Inc() + + if finalizeErr := objHandler.FinalizeS3Object(); finalizeErr != nil { + in.log.Errorf("failed finalizing objects from S3 bucket (manual cleanup is required): %w", finalizeErr) + } } }