Skip to content

Commit

Permalink
storage controller: sleep between compute notify retries
Browse files Browse the repository at this point in the history
Closes: #8820
  • Loading branch information
jcsp committed Aug 29, 2024
1 parent c5ef779 commit 3122801
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions storage_controller/src/reconciler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,19 @@ impl Reconciler {
tracing::warn!(
"Live migration blocked by compute notification error, retrying: {e}"
);

// Don't busy-poll the control plane API: sleep between attempts
match tokio::time::timeout(Duration::from_millis(1000), self.cancel.cancelled())
.await
{
Ok(_) => {
// Reconciler cancelled
return Err(ReconcileError::Cancel);
}
Err(_) => {
// Timeout expired, retry
}
}
}
}
}
Expand Down

0 comments on commit 3122801

Please sign in to comment.