Skip to content

Commit

Permalink
Ensure CheckpointBuilder can be aborted at end of epoch (#20442)
Browse files Browse the repository at this point in the history
  • Loading branch information
mystenmark authored Nov 26, 2024
1 parent edf7a29 commit 53cccd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/sui-core/src/checkpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,9 @@ impl CheckpointBuilder {
self.metrics.checkpoint_errors.inc();
return;
}
// ensure that the task can be cancelled at end of epoch, even if no other await yields
// execution.
tokio::task::yield_now().await;
}
debug!(
"Waiting for more checkpoints from consensus after processing {last_height:?}; {} pending checkpoints left unprocessed until next interval",
Expand Down

0 comments on commit 53cccd8

Please sign in to comment.