Files
KamadoPool/api/internal/logmon
satoshi 92fcb70d93 Fix tailer cursor not saved when context cancelled at EOF poll
When the tailer is parked at EOF polling for new log lines (the steady
state between blocks), a context cancellation causes sleep() to return
false, which previously triggered a bare return without force-saving the
cursor. On restart the throttled saveCursor(false) call had last fired
when the file was at offset 0 (empty on first open), so the tailer
replayed the entire log from the beginning.

The fix adds saveCursor(true) before the return so the cursor is always
flushed at the position we actually read to, regardless of when the
process is stopped.

Found by TestTailerRun_CursorResume, which expects a resumed tailer to
see only newly appended lines and not replay previously processed ones.
2026-04-28 23:25:43 +03:00
..