Skip to content

Commit

Permalink
fix precommit scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
cernicc committed Feb 18, 2025
1 parent 176455a commit c6c7dea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storage-provider/server/src/pipeline/add_piece.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ pub async fn add_piece(
fill_percentage,
fill_threshold,
);
return state.send_pre_commit(sector_number);

// Schedule a new precommit to be executed immediately
let when = Duration::from_secs(0);
schedule_pre_commit(state.clone(), tracker, sector_number, when).await;
return Ok(());
}
tracing::debug!(
%sector_number,
Expand All @@ -76,6 +80,7 @@ pub async fn add_piece(
state.server_info.sealing_configuration.wait_deals_delay,
duration_to_deal_start,
);

// We always try to schedule a new pre-commit
schedule_pre_commit(state.clone(), tracker, sector_number, when).await;

Expand Down

0 comments on commit c6c7dea

Please sign in to comment.