[pkg/stanza] Creating unsafeReader
returns an error when initialised with fromBeginning
set to false
#12766
Labels
unsafeReader
returns an error when initialised with fromBeginning
set to false
#12766
Describe the bug
When a new
Reader
is created by using areaderBuilder
for a file not set to be read from the beginning,readerBuilder
overwrites tries to determine the offset in thebuild()
function. In particular, this happens whenunsafeReader
is called on thereaderFactory
. This bug caused thefilelog
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
The text was updated successfully, but these errors were encountered: