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 7.12: Properly update offset in case of unparasable line #24886

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Apr 1, 2021

Cherry-pick of PR #22685 to 7.12 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

@ChrsMark ChrsMark added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team labels Apr 1, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Platforms)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels 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: Pull request #24886 updated

  • Start Time: 2021-04-01T07:36:49.490+0000

  • Duration: 91 min 16 sec

  • Commit: 9628733

Test stats 🧪

Test Results
Failed 0
Passed 46523
Skipped 4981
Total 51504

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 46523
Skipped 4981
Total 51504

@ChrsMark ChrsMark merged commit 152766b into elastic:7.12 Apr 1, 2021
@zube zube bot removed the [zube]: Done label Jun 30, 2021
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants