deps: bump go-tail to fix duplicates and stalls - #1350
Open
bigbes wants to merge 4 commits into
Open
Conversation
Three small defects in the follow fallback plumbing: * the "log file unavailable" message passed no argument for its %q verb and printed %!q(MISSING) instead of the file name (go vet does not catch it: apex/log is not recognized as a printf wrapper); * tryReopenTailer slept retryOpenDelay before the first attempt even when the file was already back in place, and the timer.Stop deferred inside the loop piled up until the function returned — try first, wait only between attempts; * a tailer that stopped without an error was reported through %w with a nil operand, producing "%!w(<nil>)" — report it as an unexpected termination instead. Part of TNTP-3131
Both follow paths asked the tail library for incomplete lines. At EOF the library then yields the half-written line it happened to catch and seeks to the end of the file, which splits a log record in two and can skip bytes appended between the read and the seek. Log records are line-oriented, so buffer the half-written line until its newline arrives instead. Part of TNTP-3131
go-tail v1.4.14 could deliver a line twice right after a log rotation: a watch armed while the file was being replaced kept a stale size baseline, so the first write to the new file looked like a truncation and forced a reopen from offset zero; a watch kept across the reopen paths could also be dead with a latched delete notification, forcing one more reopen. A watcher goroutine that lost its events channel exited silently, corrupting the shared watch refcount and stalling the tailer forever. The pinned revision is the head of tarantool/go-tail#6; switch it to the v1.4.15 tag once the fix is released. Part of TNTP-3131
The 0.5 s pause between creating the replacement file and writing to it was a crutch for the tailer losing a rotation that landed while its watch was not armed. The tail library now rechecks the file after arming the watch and re-arms it across reopens, so the rotation test can exercise the tight timing again. 20 consecutive runs of all 42 test cases passed with the delay removed. Part of TNTP-3131
bigbes
force-pushed
the
bigbes/tntp-3131-go-tail-bump
branch
from
August 7, 2026 04:47
e90e0bd to
9129fa8
Compare
sssciel
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
go-tail v1.4.14 could deliver a line twice right after a log rotation (a watch armed while the file was being replaced kept a stale size baseline, so the first write to the new file looked like a truncation and forced a reopen from offset zero; a watch kept across the reopen paths could be dead with a latched delete notification, forcing one more reopen) or stall the tailer forever after its watcher goroutine lost the shared events channel. This bumps go-tail to the fix and cleans up the tt-side follow plumbing. The pinned revision is the head of tarantool/go-tail#6; it will be switched to the v1.4.15 tag once the fix is released.
Part of TNTP-3131