-
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: signal pending only once #9054
base: master
Are you sure you want to change the base?
Conversation
210178b
to
cc1411e
Compare
@edsiper could you please have a review again? Thanks! |
If I'm correct you'd also have to add a check here to ensure that even if there's an error checking a file the signal is sent, otherwise you might lose the "scheduled" signal in some corner cases. Other than that it looks good to me. |
Just to clarify, this is a bug not brought in by this PR, right? |
No, with the previous approach each time the function detected that it the signal needed to be sent it was immediately sent which means if it were iterating 100 files and the 50th caused it to abort through the codepath I linked it would've sent the signal before whereas with the new (and proper) approach it wouldn't because it just sets a flag that's checked only in the "everything went well" code path. |
cc1411e
to
f2eeada
Compare
Right, thanks very much for detailed explanation. Changed, PTAL! |
@lecaros I remember like a year ago you did an extensive test on this area, wondering if you can run those tests again ? |
Moving to next milestone to run extensive workload testing |
Is there anything to fix for |
@lecaros any help is appreciated |
FYI: Tests look good. I want to give it another fresh run tomorrow, tho. |
I did a few long runs in k8s as well. No issues. Thanks for allowing testing this before merging. |
@edsiper can this PR be merged for next release? |
@edsiper can you approve and merge this PR? Thanks! |
@edsiper is this PR ready to be merged? |
@edsiper please merge this PR, it's ready and delaying it will cause issues. |
Prior to this commit, if the tail is watching over multiple files, each file signals pending and results in calling in_tail_collect_pending() multiple times. Since function in_tail_collect_pending() goes through all watched files for pending data so calling it once is sufficient. This commit changes that by only signal pending event when there is any pending data from any watched files. Signed-off-by: Eric Lin <[email protected]>
f2eeada
to
961e908
Compare
Rebased and bump for merging |
Prior to this commit, if the tail is watching over multiple files, each file signals pending and results in calling in_tail_collect_pending() multiple times. Since function in_tail_collect_pending() goes through all watched files for pending data so calling it once is sufficient.
This commit changes that by only signal pending event when there is any pending data from any watched files.
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:
[N/A] Example configuration file for the change
[N/A] Debug log output from testing the change
[N/A] Attached Valgrind output that shows no leaks or memory corruption was found
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
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.