-
Notifications
You must be signed in to change notification settings - Fork 77
perf(runtime-service): use short retry when no peers available #3213
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1040,6 +1040,11 @@ pub struct StorageQueryError { | |
| } | ||
|
|
||
| impl StorageQueryError { | ||
| /// Returns `true` if no peers were available to query. | ||
| pub fn is_no_peers(&self) -> bool { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have a "no peers" path for parahead fetch?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, and it doesn't need one. |
||
| self.errors.is_empty() | ||
| } | ||
|
|
||
| /// Returns `true` if this is caused by networking issues, as opposed to a consensus-related | ||
| /// issue. | ||
| pub fn is_network_problem(&self) -> bool { | ||
|
|
||
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.
async_op_failure_retry_atis a new public API but its docs omit the same# Paniccontract asasync_op_failure(it will also panic ifAsyncOpIdis invalid due to the internalunwrap()). Please document the panic conditions (and any expectations such as whetherretry_aftermay be in the past) to keep the API contract consistent.