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 Filter can lose logs on shutdown #4918

Open
PettitWesley opened this issue Feb 24, 2022 · 2 comments
Open

Multiline Filter can lose logs on shutdown #4918

PettitWesley opened this issue Feb 24, 2022 · 2 comments

Comments

@PettitWesley
Copy link
Contributor

Bug Report

For context on the multiline filter see: #4309

On shutdown if there is a pending multiline log in the buffer, it can be lost. I still need to spend some more time double checking exactly in what cases this happens, but I've seen it. Run Fluent Bit, send it multiline logs and use the filter and then send it a SIGTERM, and the last multiline is not always delivered.

I think this is because even if the multiline library flushes the data before shutdown, the in_emitter instance is already paused and so the records are never emitted. I need to investigate this more and check, but that's my hypothesis.

@agup006
Copy link
Member

agup006 commented Feb 24, 2022

Needs design approval, @PettitWesley looking to get work done. Not critical for 1.9, however as soon as possible.

@PettitWesley
Copy link
Contributor Author

Discussed with @edsiper I will implement this using the pause callback on the input. Right now a pause call back is not registered by in_emitter, but optionally it could be, and then this can be used to flush the multiline buffer on shutdown. I will work on implementing this.

@lecaros lecaros added enhancement AWS Issues with AWS plugins or experienced by users running on AWS and removed status: waiting-for-triage labels Mar 23, 2022
@PettitWesley PettitWesley removed the AWS Issues with AWS plugins or experienced by users running on AWS label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants