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

Cherry-pick #22685 to 6.8.x: Properly update offset in case of unparasable line #24887

Merged
merged 4 commits into from
Apr 2, 2021

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Apr 1, 2021

Manual backport of PR #22685 to 7.x branch. Original message:

What does this PR do?

This PR adds a fix for cases of docker reader meets an unparsable line and skips it (introduced at #12268). In such cases we should properly update the offset by adding the skipped bytes so as to point to the right byte.

Why is it important?

Having a wrong offset in the registry will make harvester start from the wrong offset in case of Filebeat's restarts or reopened files which will lead to another ErrLineUnparsable. Offset will never be healed from now on.

Testing notes

  1. make python-env
  2. source ./build/python-env/bin/activate
  3. make filebeat.test
  4. pytest tests/system/test_container.py

Signed-off-by: chrismark <chrismarkou92@gmail.com>
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 1, 2021
@ChrsMark ChrsMark added the Team:Integrations Label for the Integrations team label Apr 1, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 1, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 1, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Started by user Chris Mark

  • Start Time: 2021-04-02T08:52:01.358+0000

  • Duration: 30 min 30 sec

  • Commit: 538157a

Test stats 🧪

Test Results
Failed 0
Passed 721
Skipped 4
Total 725

Trends 🧪

Image of Build Times

Image of Tests

Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
@ChrsMark
Copy link
Member Author

ChrsMark commented Apr 1, 2021

/test

1 similar comment
@ChrsMark
Copy link
Member Author

ChrsMark commented Apr 2, 2021

/test

@ChrsMark ChrsMark merged commit 5709736 into elastic:6.8 Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants