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

[s3] $INDEX in s3_key_format can be incorrect with multipart uploads #653

Open
PettitWesley opened this issue May 16, 2023 · 4 comments
Open

Comments

@PettitWesley
Copy link
Contributor

Am I impacted?

If you have an S3 output: https://docs.fluentbit.io/manual/pipeline/outputs/s3

And have use_put_object false (the default) and have an s3_key_format that uses $INDEX you may be impacted.

Bug Impact

When a multipart UploadPart call fails, the index can be incorrectly decremented, leading it to be wrong (smaller value that expected) for the next file upload. This may cause the same INDEX number to be used repeatedly in a row.

Root Cause: Code Bug

The code should only decrement the $INDEX when the multipart upload is marked for failure.

Currently it decrements here instead:

@PettitWesley
Copy link
Contributor Author

Quick fix for AWS distro: https://github.com/PettitWesley/fluent-bit/pull/25/files

The S3 stability refactor that I am working on here also has a full logic fix: https://github.com/PettitWesley/fluent-bit/pull/24/files

@PettitWesley
Copy link
Contributor Author

This will be fixed once I get 2.31.12 out: https://github.com/aws/aws-for-fluent-bit/blob/mainline/CHANGELOG.md

@PettitWesley PettitWesley changed the title [s3] $INDEX in s3_key_format can be incorrect with multipart uplaods [s3] $INDEX in s3_key_format can be incorrect with multipart uploads Jun 30, 2023
@PettitWesley
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant