Skip to content

Commit

Permalink
add cancelling to view change event
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-maron committed Dec 18, 2023
1 parent 0f95a6e commit 8d20bad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/task-impls/src/view_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,14 @@ impl<

// Garbage collect old tasks
// We could put this into a separate async task, but that would require making several fields on ViewSyncTaskState thread-safe and harm readability. In the common case this will have zero tasks to clean up.
// cancel poll for votes
self.network
.inject_consensus_info(
ConsensusIntentEvent::CancelPollForLatestViewSyncProposal,
)
.await;

// run GC
for i in *self.last_garbage_collected_view..*self.current_view {
if let Some((_key, replica_task_info)) =
self.replica_task_map.remove_entry(&TYPES::Time::new(i))
Expand Down

0 comments on commit 8d20bad

Please sign in to comment.