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.
For fluent/fluentd#994
NameError: uninitialized constant Fluent::FileBufferChunk
Unifying logic of generating hex_random
Logic of generating hex_random was trivially changed. Now, the logic to generate hex_random was unified to get from chunk.unique_id. Before, it was generated from chunk.unique_id for FileBufferChunk and was generated from SecureRandom.hex for others.
Below is the list of how unique_id is generated. I analyzed that hex_random can be generated as
unique_hex(chunk).reverse[0...@hex_random_length]
for all of them with good randomness. So, I made codes common for all of them.v0.12
FileBufferChunk
MemoryBufferChunk
LighteningBufferChunk
same with MemoryBufferChunk (as it extends MemoryBufferChunk)
v0.14