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

[pkg/stanza] Creating unsafeReader returns an error when initialised with fromBeginning set to false #12766

Closed
aboguszewski-sumo opened this issue Jul 28, 2022 · 1 comment · Fixed by #12767
Assignees
Labels
bug Something isn't working priority:p1 High receiver/filelog

Comments

@aboguszewski-sumo
Copy link
Member

aboguszewski-sumo commented Jul 28, 2022

Describe the bug
When a new Reader is created by using a readerBuilder for a file not set to be read from the beginning, readerBuilder overwrites tries to determine the offset in the build() function. In particular, this happens when unsafeReader is called on the readerFactory. This bug caused the filelog receiver to crash after restarting.

Additional context
This bug has been found because the filelog reader did not work correctly.
Steps to reproduce, expected and actual result can be seen here: SumoLogic/sumologic-otel-collector#681

@aboguszewski-sumo aboguszewski-sumo added the bug Something isn't working label Jul 28, 2022
@aboguszewski-sumo
Copy link
Member Author

I've already fixed it and I'll send the PR in a few minutes, this issue was made only to link it in the changelog.

@aboguszewski-sumo aboguszewski-sumo changed the title [pkg/stanza] Creating unsafeReader returns an error when initialised with fromBeginning set to true [pkg/stanza] Creating unsafeReader returns an error when initialised with fromBeginning set to false Jul 28, 2022
@djaglowski djaglowski self-assigned this Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p1 High receiver/filelog
Projects
None yet
2 participants