-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cosmovisor: set larger buffer size for cosmovisor to scan log (fix #8651) #8653
Conversation
cosmovisor/scanner.go
Outdated
@@ -27,6 +27,10 @@ type UpgradeInfo struct { | |||
// It returns (nil, err) if the input stream errored | |||
// It returns (nil, nil) if the input closed without ever matching the regexp | |||
func WaitForUpdate(scanner *bufio.Scanner) (*UpgradeInfo, error) { | |||
// set larger buffer in case the line is too long, the default one is 64*1024 | |||
const maxCapacity = 512 * 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making it a ENV setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could work - as long as sane defaults are provided 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100a5dd
to
3b6c892
Compare
3b6c892
to
c471405
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
@clevinson @robert-zaremba do we still need this as we are replacing it with file based approach in #8590
I do think we still want to switch to the file based approach. There are other security reasons to do so. |
@aaronc is this still going to be merged? |
…smos#8651) (cosmos#8653) * cosmovisor: set larger buffer for cosmovisor to scan log (fix cosmos#8651) * update cosmovisor README and set buffer size to ENV setting Co-authored-by: Marko <marbar3778@yahoo.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Description
Set larger buffer size for cosmovisor to scan log.
The default 64K is not enough and cosmovisor can be stuck.
closes: #8651
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes