Repository navigation
parser: pass on a split line that never ends once its first part is old - #37
Merged
Merged
Conversation
A line the runtime splits that keeps growing without a newline (a progress bar) stayed pending for good, since each new part reset its expiry, and while any line is pending no offset of its source can be acknowledged. Such a line is now passed on once its first part is 10 multiline timeouts old; its later parts start a new line. Also documents that LogEntry.Offset must only increase within a source.
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to prevent endless split lines (such as progress bars written without a newline) from staying pending indefinitely and blocking acknowledgements for other streams. It adds a first timestamp to pendingLine to track when the first part of a line arrived, and updates the expired method to also remove lines that exceed a maximum age (partialLineMaxAge). Corresponding unit tests have been added to verify this behavior. There are no review comments to evaluate, and the changes look solid.
mayankpande88
approved these changes
Oct 23, 2026
mayankpande88
pushed a commit
to nudgebee/node-agent
that referenced
this pull request
Oct 24, 2026
…408) Pins logparser 38071d9 (nudgebee/logparser#37). A container that writes a line split across log records and never ends it no longer holds back acknowledgements, so positions for its file keep advancing.
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.
Summary
Follow-up to #36 (review point on split lines that never end).
A split line holds back acknowledgements for its whole source until its last part arrives. A line that keeps growing without a newline (a progress bar) never got there: each new part reset its expiry, so the source's offset could never advance.
partialLineMaxAge), even while parts keep arriving. Its later parts start a new line.LogEntry.Offsetdoc: offsets must only increase within a source (a reader that restarts a file keeps them increasing, e.g. a generation in the high bits).No API change.
Test plan
go test ./...andgo vet ./...pass (6 full runs).TestEndlessSplitLineDoesNotBlockAcknowledgements: stdout keeps growing while a stderr line waits; the stderr line must be acknowledged. It fails without the first-part cutoff;TestPartialLinescovers the cutoff directly. Timing-sensitive tests pass 30 repeats.