mirror of https://github.com/containers/podman.git
When streaming events, prevent returning duplicates after a log rotation by marking a beginning and an end for rotated events. Before starting to stream, get a timestamp while holding the event lock. The timestamp allows for detecting whether a rotation event happened while reading the log file and to skip all events between the begin and end rotation event. In an ideal scenario, we could detect rotated events by enforcing a chronological order when reading and skip those detected to not be more recent than the last read event. However, events are not always _written_ in chronological order. While this can be changed, existing event files could not be read correctly anymore. Fixes: #17665 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com> |
||
---|---|---|
.. | ||
config.go | ||
events.go | ||
events_freebsd.go | ||
events_linux.go | ||
events_unsupported.go | ||
filters.go | ||
journal_linux.go | ||
journal_unsupported.go | ||
logfile.go | ||
logfile_test.go | ||
memory.go | ||
nullout.go |