Allow long lines in output of daemon and prep commands.#113
Open
gbegen wants to merge 1 commit intocortesi:masterfrom
Open
Allow long lines in output of daemon and prep commands.#113gbegen wants to merge 1 commit intocortesi:masterfrom
gbegen wants to merge 1 commit intocortesi:masterfrom
Conversation
Author
|
As additional context, we have an app that outputs logs to stdout as JSON lines. When run under modd, the occasional long line gets broken into multiple lines with separating "\n" between them. This breaks the ability for our log readers to see the full JSON structure. Upping to 64K solves this at the modest expense of 60K per running process. |
The default bufio.Reader buffer size of 4K is too small in some contexts. Use a buffer size of 64K instead.
9afb7eb to
22fae93
Compare
|
We are hitting this problem as well. 64k would be good, but making it configurable would be better. We have use cases where we may need a 1M size. |
|
I looked at the code closer, i think the problem is less about the buffer size but the code assumes that a complete line will fit within the buffer. The |
phillipgziprecruiter
added a commit
to phillipgziprecruiter/modd
that referenced
this pull request
Apr 22, 2022
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.
The default bufio.Reader buffer size of 4K is too small in some contexts. Use a buffer size of 64K instead.