-
Notifications
You must be signed in to change notification settings - Fork 182
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
server+discovery: Only log errors if request was not cancelled #1837
Conversation
b2f2071
to
b481d15
Compare
discovery/discovery.go
Outdated
@@ -85,8 +86,11 @@ func (o *orchestratorPool) GetOrchestrators(numOrchestrators int, suspender comm | |||
infoCh <- info | |||
return | |||
} | |||
if err != nil && monitor.Enabled { | |||
monitor.LogDiscoveryError(err.Error()) | |||
if err != nil && !errors.Is(err, context.Canceled) && !errors.Is(err, context.DeadlineExceeded) { |
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.
I think we should still log an error if the error wraps a context.DeadlineExceeded
as that would indicate a timeout with the O which still feels useful to be aware of as it tells us the O could not respond within the timeout while a context.Cancelled
(and empirically, the majority of excessive logging on mainnet for Bs seems to be from context.Cancelled
) is always B initiated and doesn't really tell us anything about O's ability to respond. WDYT?
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.
Fixed and rebased, will approve when CI passes.
b481d15
to
d150b5e
Compare
d150b5e
to
086754e
Compare
I just updated the commit message and force pushed (removed "deadline exceeded" bit) , CI already passed before this so I think iit should be okay to merge. |
What does this pull request do? Explain your changes. (required)
Specific updates (required)
server
package instead of concatenating the error message strings. This allows usage oferrors.Is()
because it can now unwrap error messages.context.Canceled
orcontext.Exceeded
and only log the error if it doesn'tHow did you test each of these updates (required)
Ran a broadcaster on rinkeby
Does this pull request close any open issues?
Fixes #1846
Checklist:
make
runs successfully./test.sh
pass