Closed k-kinzal closed 4 years ago
- Existence check-in S3
- This doesn't cause duplication, but it does slow down throughput
This configuration pattern will be needed in the future. But it is not needed now.
Like as fluent-plugin-s3: https://github.com/fluent/fluent-plugin-s3/blob/master/lib/fluent/plugin/out_s3.rb#L263-L293
@cosmo0920 Thank you for checking the PR.
Can we provide configuration parameter which provides sha256 suffix or nothing suffix (previous behavior)?
Oh! That's a very good idea! I will change this PR to use configuration.
This configuration pattern will be needed in the future. But it is not needed now.
Yes, I think this feature is necessary too. However, it's hard to implement this feature safely, so for now I'd like to implement it in a way that adds a suffix to the object.
This configuration pattern will be needed in the future. But it is not needed now.
Yes, I think this feature is necessary too. However, it's hard to implement this feature safely, so for now I'd like to implement it in a way that adds a suffix to the object.
I see. It's reasonable for me.
Thanks for the update. SuffixAlgorithm seems to be able to provide uuid case....
@cosmo0920
SuffixAlgorithm seems to be able to provide uuid case....
Sorry, I don't understand the intent of this comment.
I thought SuffixAlgorithm
only supported sha256
or no suffix,
but the uuid
code was still there?
SuffixAlgorithm seems to be able to provide uuid case....
Sorry, I don't understand the intent of this comment. I thought SuffixAlgorithm only supported sha256 or no suffix, but the uuid code was still there?
I mean that adding uuid suffix was also preventing way to filename collisions as of replied to your comment. But now, adding suffixes is selectable. I'm got rethinking about it. As a result, adding uuid mechanism will be redundant for me....
@cosmo0920 OK! I understood.
adding uuid mechanism will be redundant for me....
Yes, I also think sha256 prevents collisions, so no uuid mechanism is a good thing.
Updated the code and PR description to support sha256 in the SuffixAlgorithm
parameter.
I added a trace log and checked it, and then put it to the same object key is happening.
This problem causes some logs to be lost.
So I added a UUID to the file name suffix.I decided to use UUID because I thought it was the most secure of the following options.Existence check-in S3This doesn't cause duplication, but it does slow down throughputAdd a suffix of count numberIt works in one process but duplicates in multiple processesAdd a suffix of sha256Duplicates are rare but the character length is very longAdd a suffix of UUIDDuplicates are rare and do not slow down throughput as much as S3 existence checksUpdate: Allow configuration parameters to select
sha256
orno suffix
. This will prevent object key collisions.If
SuffixAlgorithm
is empty or omitted, no suffix will be given. The default is empty.Test cases
I have checked to work with EKS v1.14 and fluent-bit v1.3.11.