Logstash now restores and uploads the corrupted files to S3.
What does this PR do?
Backports logstash-output-s3 corrupted S3 file issue case (PR #249).
Why is it important/What is the impact to the user?
When using GZIP encoding option with output to AWS S3 plugin, there are cases where Logstash may be crashed. When Logstash crashed GZIP stream is left opened and no tail in the file exist. Logstash uploads corrupted file to S3 at restart but customers who download S3 file and use, they figured out the file is corrupted.
This PR aims to recover the corrupted file at restart time and upload healthy GZIP file to S3.
Checklist
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have made corresponding change to the default configuration files (and/or docker env variables)
[x] I have added tests that prove my fix is effective or that my feature works
Release notes
Logstash now restores and uploads the corrupted files to S3.
What does this PR do?
Backports
logstash-output-s3
corrupted S3 file issue case (PR #249).Why is it important/What is the impact to the user?
When using GZIP encoding option with output to AWS S3 plugin, there are cases where Logstash may be crashed. When Logstash crashed GZIP stream is left opened and no tail in the file exist. Logstash uploads corrupted file to S3 at restart but customers who download S3 file and use, they figured out the file is corrupted. This PR aims to recover the corrupted file at restart time and upload healthy GZIP file to S3.
Checklist
Author's Checklist
How to test this PR locally
Related issues