-
Notifications
You must be signed in to change notification settings - Fork 501
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
Include Heimdall Timeout #1457
Include Heimdall Timeout #1457
Conversation
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.
Might be worth calling ticker.Reset()
here because if heimdall api timeout is >5s, the ticker will immediately get triggered when we enter loop again defeating it's purpose.
bor/consensus/bor/heimdall/client.go
Lines 325 to 331 in 3154fc4
if err != nil { | |
if attempt%logEach == 0 { | |
log.Warn("an error while trying fetching from Heimdall", "path", url.Path, "attempt", attempt, "error", err) | |
} | |
continue retryLoop | |
} |
Or maybe another idea is to set ticker retry timeout to same as heimdall timeout?
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.
Few minor nits.
@manav2401 , I like the idea of setting the ticker retry to the same as heimdall. Because it holds the behavior the user previously configured. |
@manav2401 |
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.
One minor nit. Except that, good to go!
Thanks for the clarification. Fixed on 5f6e2d3 |
Description
Implementation for #1455 . Including configurable timeout for Heimdall. You can pass it via flag or via
config.toml
, like in the example below:Changes
Checklist
Testing
Manual tests
Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it