Ignore non buffer chunk files when resumed #1124
Merged
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.
This fixes #1098.
buf_file
in v0.14 loads all files which matches with glob for buffer file path as queued. That behavior is to read files as much as possible when upgrading Fluentd.But there is a bug to read files as queued, which is written by
out_file
in the same directory with buffer chunk files.This change is to fix not to load files which doesn't have a part like
(b|q)[0-9a-f]+
, which shows that file is a buffer chunk.note about #1098
#1098 is a result of combination of this bug and
append true
, which does read data from buffer chunk file (this file) and also does write these data to output file (this file) - it is infinite loop of read & write.The minimum steps to reproduce it is:
echo "foobar" > temperature.\
ruby -e 'puts Time.now.strftime("%Y%m%d")'.log