mirror of https://github.com/grafana/loki
Promtail: Fix file descriptor leak (#8987)
This reduces the amount of open file descriptors per followed journal file from 3 to 2. It also releases file descriptors for removed files (journal vacuuming). The `defaultJournalEntryFunc` is only called once upon startup. It creates a `Journal` instance to only read a single entry to determine the age of the entry referenced in the positions file. Right after, this instance is not required anymore. The actually used `Journal` instance used to follow the journal is created inside `journalTargetWithReader`.pull/8984/head^2
parent
f785faa820
commit
954df433e9
Loading…
Reference in new issue