-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Filebeat] keep track of bytes read when max_bytes exceeded #28352
[Filebeat] keep track of bytes read when max_bytes exceeded #28352
Conversation
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request does not have a backport label. Could you fix it @leehinman? 🙏
NOTE: |
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
c9e7b46
to
8f608cb
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
This pull request is now in conflicts. Could you fix it? 🙏
|
8f608cb
to
b59a6f4
Compare
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.
@leehinman Could you try to write some godocs for the Next()
method. Without a specification for its behavior I worry that someone might either change the implementation unknowingly or use it incorrectly.
IIUC the int
that is returned by LineReader#Next()
accumulates the sizes of skipped lines and has little relation to the length of the returned []byte
?
b59a6f4
to
403e576
Compare
Good idea. Updated. |
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
…28379) * [Filebeat] keep track of bytes read when max_bytes exceeded in LineReader Closes #28317 (cherry picked from commit dad462c) Co-authored-by: Lee E Hinman <[email protected]>
…28352) * [Filebeat] keep track of bytes read when max_bytes exceeded in LineReader Closes elastic#28317
What does this PR do?
Keeps track of bytes read when
max_bytes
is exceeded.Why is it important?
Without this offset is wrong in the events and the registry. This
leads to re-reading events from the point where
max_bytes
isexceeded.
Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
See #28317
Related issues