-
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: Preventing incorrect inode usage from db. #8025 #8062
Conversation
3df12c5
to
5f9469c
Compare
This PR is now ready for review. |
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 made a few observations concerning error checking. The actual functionality seems to be robust and the tests seem to actually prove the patch works as expected.
@jinyongchoi thanks for your PR looking forward to merge this, would you please address the comments pointed out by @pwhelan ? thank you |
… (1/2) To prevent incorrect inode references, FluentBit automatically removes unmanaged inodes during startup. Signed-off-by: jinyong.choi <[email protected]>
5f9469c
to
7e710f9
Compare
…luent#8025)(2/2) When checking the existence of a file's inode, if the 'compare_filename' option is enabled, it is modified to compare the filename as well. If the inode matches but the filename is different, it removes the stale inode from the database. Signed-off-by: jinyong.choi <[email protected]>
7e710f9
to
d06114c
Compare
Tested the new implementation, and it works as expected. When the option DB.compare_filename is enabled, the incorrect offset issue doesn't occur |
@edsiper I have checked and all my comments have been resolved. |
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.
LGTM
thank you |
Preventing incorrect inode usage from db.
The first commit involves deleting items that are not being monitored by Fluent-Bit when it starts.
The second commit involves considering already running Fluent-Bit instances, preventing incorrect inode usage during execution.
This commit is more about enhancement option than fixing a bug. That's why 'true' and 'false' may be needed depending on the user's use case.
Fixes #8025
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:
Example configuration file for the change
fluent-bit-test.conf
To account for situations where file events may not be properly detected, the creation and deletion process is repeated without using 'sleep'.
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
N/A
] Run local packaging test showing all targets (including any new ones) build.N/A
] Setok-package-test
label to test for all targets (requires maintainer to do).Documentation
#1238
Backporting
N/A
] Backport to latest stable release.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.