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

BufferedTokenizerExt does not clear size marker on flush #16762

Closed
yaauie opened this issue Dec 5, 2024 · 1 comment · Fixed by #16760
Closed

BufferedTokenizerExt does not clear size marker on flush #16762

yaauie opened this issue Dec 5, 2024 · 1 comment · Fixed by #16760

Comments

@yaauie
Copy link
Member

yaauie commented Dec 5, 2024

Logstash information:

Please include the following information:

  1. Logstash version (e.g. bin/logstash --version): 6.x->9.x

Description of the problem including expected versus actual behavior:

When a BufferedTokenizer emits events through its flush method, the buffer is cleared but the internal state tracking the size of the buffer is not reset (link), resulting in subsequent use risking exceptions related to overfilling the buffer's size limit.

This is especially true for cases where events are only emitted through the flush method (e.g., sending json blobs without newline termination to the json_lines codec), in which case the metadata is never reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants