Skip to content

Commit

Permalink
Merge pull request #3339 from autonomys/quite-plotter-timeout-handling
Browse files Browse the repository at this point in the history
Handle plotter request timeouts quietly the same was as no responders
  • Loading branch information
nazar-pc authored Jan 9, 2025
2 parents bfa1eef + cfb2c7d commit a9c459d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion crates/subspace-farmer/src/cluster/plotter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,24 @@ where
}
}
Err(error) => match error.kind() {
RequestErrorKind::TimedOut => {
if let Some(delay) = retry_backoff_policy.next_backoff() {
debug!("Plotter request timed out, retrying");

tokio::time::sleep(delay).await;
continue;
} else {
progress_updater
.update_progress_and_events(
progress_sender,
SectorPlottingProgress::Error {
error: "Plotter request timed out, exiting".to_string(),
},
)
.await;
return None;
}
}
RequestErrorKind::NoResponders => {
if let Some(delay) = retry_backoff_policy.next_backoff() {
debug!("No plotters, retrying");
Expand All @@ -514,7 +532,7 @@ where
return None;
}
}
RequestErrorKind::TimedOut | RequestErrorKind::Other => {
RequestErrorKind::Other => {
progress_updater
.update_progress_and_events(
progress_sender,
Expand Down

0 comments on commit a9c459d

Please sign in to comment.