[8.19](backport #49734) Fix: Implement backup_to_bucket_ and delete_after_backup for aws-s3 polling mode#51883
Closed
mergify[bot] wants to merge 1 commit into
Closed
[8.19](backport #49734) Fix: Implement backup_to_bucket_ and delete_after_backup for aws-s3 polling mode#51883mergify[bot] wants to merge 1 commit into
mergify[bot] wants to merge 1 commit into
Conversation
…olling mode (#49734) * Fix: Implement backup_to_bucket_ and delete_after_backup for aws-s3 polling mode * add changelog * fix linting errors * Remove status update in every failure (cherry picked from commit e3ddd67) # Conflicts: # x-pack/filebeat/input/awss3/s3_input.go # x-pack/filebeat/input/awss3/s3_test.go
Contributor
Author
|
Cherry-pick of e3ddd67 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Contributor
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When Filebeat
aws-s3input runs in polling mode (e.g.non_aws_bucket_namefor MinIO/S3-compatible), it can fully process an object (events published and registry state stored) but never performbackup_to_bucket_*anddelete_after_backup.User-visible symptom
stored: true.CopyObject/DeleteObjectcalls for the processed object.Root cause (bug)
Object finalization (backup/delete) is implemented in
(*s3ObjectProcessor).FinalizeS3Object()ins3_objects.go.sqs_s3_event.go),FinalizeS3Object()is collected and executed after successful processing / ACK.s3_input.go), the ACK callback used to only checkpoint state (in.registry.AddState(state)) and increment metrics. It did not callFinalizeS3Object().As a result, polling mode could mark objects as completed in the registry without ever copying/deleting them.
Fix
In
s3_input.go(poller worker loop), callFinalizeS3Object()inside the ACK callback after all events for the object are ACKed, and only when processing succeeded (state.Stored == true).Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
None. It fixes the problem.
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #49734 done by [Mergify](https://mergify.com).