logtail: the deferred counter remembers a place in the log, not a second (stage 2b)
test / test (push) Canceled after 0s
test / test (push) Canceled after 0s
The counter passed over, while catching up after a start, every warning no later than the last one counted - by time; mail.log stamps whole seconds, so a second warning of that second, later in the file, was lost. - The tailer gives each line its place (Place: the file's fingerprint and the offset just past the line): follow tracks the bytes the reader hands over, readRotated likewise in mail.log.1. Run hands tr.line to the counter. - store.AddSenderCheckDeferred(at, n, place) counts, moves the last-deferral mark (never back - an upsert WHERE) and saves the place (settings sender_check_counted_place) in one transaction. - Catching up, a warning in the file of the last one counted is passed over by place (end <= counted end); in another file - a rotated log read again - by time, as before. The fingerprint carries the inode, so the place stays true across a rotation. Tests: two warnings of one second, an unclean stop between them, all lines read again - each counted once; the store saves the place with the count and keeps the latest deferral time. Existing counter tests pass a zero place (time rule). CHANGELOG [Unreleased], audit plan line ticked, roadmap 24/62. Evidence: go vet ./... clean; go test ./internal/store, ./internal/logtail ok (but for the Windows-only test); the server run follows before the push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -751,7 +751,7 @@ order - each stands on the one before.
|
||||
rotated twice: logged, with from when to when nothing was read. A test
|
||||
that stops the tailer, appends, rotates, appends, starts it, and finds
|
||||
both halves once. - **Opus**
|
||||
- [ ] **The deferred counter remembers a place in the log, not a second**
|
||||
- [x] **The deferred counter remembers a place in the log, not a second**
|
||||
(owner, 2026-10-14, from the Not done list of from-header-binding; he
|
||||
chose it over leaving the case written down). After an unclean stop the
|
||||
tailer re-reads lines it had read, and the counter passes over every
|
||||
|
||||
Reference in New Issue
Block a user