Skip to content

feat: fix possible line loss and duplication when file name is changed#1

Merged
oleg-jukovec merged 2 commits intomasterfrom
elhimov/gh-73-loss-and-duplication-at-log-rotation
Apr 23, 2026
Merged

feat: fix possible line loss and duplication when file name is changed#1
oleg-jukovec merged 2 commits intomasterfrom
elhimov/gh-73-loss-and-duplication-at-log-rotation

Conversation

@elhimov
Copy link
Copy Markdown

@elhimov elhimov commented Apr 17, 2026

When we use tail to collect logs (starting from the beginning of the new file), during file renaming (when flush and rename events occur very close to each other), part of the old log file may not be collected (write event -> truncated event), and the new file may be collected twice (truncated (write -> truncated) and delete events occurring simultaneously). Therefore, an issue fix is proposed.

Duplication of nxadm#73

@elhimov elhimov force-pushed the elhimov/gh-73-loss-and-duplication-at-log-rotation branch 2 times, most recently from a6bdec5 to 39df56b Compare April 20, 2026 10:27
@elhimov elhimov requested review from oleg-jukovec and sssciel April 20, 2026 10:28
Comment thread watch/inotify.go Outdated
Comment thread tail.go Outdated
Comment thread watch/inotify.go Outdated
@oleg-jukovec oleg-jukovec requested a review from bigbes April 21, 2026 11:38
@elhimov elhimov force-pushed the elhimov/gh-73-loss-and-duplication-at-log-rotation branch 5 times, most recently from feec840 to baba3a2 Compare April 22, 2026 10:43
Comment thread README.md Outdated
@elhimov elhimov force-pushed the elhimov/gh-73-loss-and-duplication-at-log-rotation branch from baba3a2 to ee3e0e6 Compare April 22, 2026 13:22
@elhimov elhimov requested a review from oleg-jukovec April 22, 2026 13:23
@elhimov elhimov changed the title feat: fix file change(rename) line loss and duplication feat: fix possible line loss and duplication when file name is changed Apr 22, 2026
@elhimov elhimov force-pushed the elhimov/gh-73-loss-and-duplication-at-log-rotation branch from ee3e0e6 to 553d0c8 Compare April 22, 2026 16:10
@oleg-jukovec oleg-jukovec merged commit d3ea0fb into master Apr 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants