[fix][auditbeat] Reset file offset when re-reading from the beginning#24414
Merged
marc-gr merged 1 commit intoelastic:masterfrom Mar 8, 2021
Merged
[fix][auditbeat] Reset file offset when re-reading from the beginning#24414marc-gr merged 1 commit intoelastic:masterfrom
marc-gr merged 1 commit intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
0a44e93 to
a3712e0
Compare
Contributor
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
54529dc to
80e970c
Compare
4 tasks
4 tasks
4 tasks
marc-gr
added a commit
to marc-gr/beats
that referenced
this pull request
Mar 8, 2021
(cherry picked from commit 1fd8c4a)
marc-gr
added a commit
to marc-gr/beats
that referenced
this pull request
Mar 9, 2021
(cherry picked from commit 1fd8c4a)
3 tasks
marc-gr
added a commit
that referenced
this pull request
Mar 15, 2021
marc-gr
added a commit
that referenced
this pull request
Mar 15, 2021
marc-gr
added a commit
to marc-gr/beats
that referenced
this pull request
Mar 15, 2021
(cherry picked from commit 1fd8c4a)
marc-gr
added a commit
that referenced
this pull request
Mar 15, 2021
This was referenced Mar 15, 2021
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…lastic#24418) (cherry picked from commit 74711d2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When a
utmpfile is read and its size is smaller than before (which can be caused by an inode reuse, for example), we have to reset its offset, also, otherwise it will ignore any new events in that file until the size is bigger than its previous value.Why is it important?
We were missing events in some edge cases.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Logs
The logs of the bug:
As you can see, it is reading from an invalid offset and saving it.
Subsequent calls still ignore new events even if the size has grown.