Skip to content
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

multiline: respect emitter paused status #8511

Closed
wants to merge 1 commit into from

Conversation

braydonk
Copy link
Contributor

When the multiline plugin tries to send logs to the emitter, it never used to check if the emitter was paused or not. The input chunk appending routines would subsequently reject the log when it got to the point of checking if the current input plugin is paused. This would return -1 and cause the esoteric "error registering chunk for tag" message to be spammed constantly while the emitter is paused.

This PR adds a check before appending logs to the emitter to see if it is currently paused. If it is, then the log will not be sent to the emitter and will be dropped (just as it would have been if it went through the rest of the chunk appending procedure, but cuts out all the extra steps).

I have an automatic whitespace trimmer that runs on save, so there's lots of trailing whitespace deleted too sorry lol

#4940


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
  • Debug log output from testing the change
  • 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.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • 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.

When the multiline plugin tries to send logs to the emitter, it never
used to check if the emitter was paused or not. The input chunk
appending routines would subsequently reject the log when it got to the
point of checking if the current input plugin is paused. This would
return -1 and cause the esoteric "error registering chunk for tag"
message to be spammed constantly while the emitter is paused.

This PR adds a check before appending logs to the emitter to see if it
is currently paused. If it is, then the log will not be sent to the
emitter and will be dropped (just as it would have been if it went
through the rest of the chunk appending procedure, but cuts out all the
extra steps).

I have an automatic whitespace trimmer that runs on save, so there's
lots of trailing whitespace deleted too sorry lol

Signed-off-by: braydonk <braydonk@google.com>
@braydonk
Copy link
Contributor Author

On this PR I was able to easily test the scenario in flush_callback but I couldn't figure out how to test the scenario in partial_timer_cb due to lack of familiarity.

@drbugfinder-work
Copy link
Contributor

drbugfinder-work commented Feb 22, 2024

Please see #8473
The issue is located in the in_emitter

@braydonk
Copy link
Contributor Author

That's a much better solution, I'll close this.

@braydonk braydonk closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants