-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
in_tail: create stream_id by file inode(#4190) #4197
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the referenced fluent-bit config file conf/multiline_rotation.conf
is not checked in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested these changes locally, and they indeed solve the issue we were having. (logs stopped getting processed and fluent-bit logs flooding with the message invalid stream_id x, could not append content to multiline context
)
Awesome job @nokute78 !!
Signed-off-by: Takahiro Yamashita <[email protected]>
If stream_id is created by filename, rotated file id will be same. It causes releasing new multiline instance after file rotation. Signed-off-by: Takahiro Yamashita <[email protected]>
@ggermis Thank you for comment and testing. I pushed missing config file. |
thank you! |
Fixes #4190
Currently, stream_id of multiline is created by filename.
It means stream_id of rotated file will be same id since the filename is same.
This patch is to create stream_id from inode string.
It will create unique stream_id even if the file is rotated.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
Documentation
Configuration
#4190 (comment)
a.conf
fluent-bit.logrotate:
mkdir /tmp/logs
echo "$(date -u +'%Y-%m-%dT%H:%M:%S.%NZ') stdout F testing..." >> /tmp/logs/x.log
fluent-bit -c a.conf
logrotate --force fluent-bit.logrotate
echo "$(date -u +'%Y-%m-%dT%H:%M:%S.%NZ') stdout F testing..." >> /tmp/logs/x.log
Debug output
There is no stream_id error like this.
[2021/10/15 13:32:53] [error] [multiline] invalid stream_id 11907403896869813768, could not append content to multiline context
Valgrind output
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.