Skip to content

Commit

Permalink
[pipeline] debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekun Li authored and Zekun Li committed Dec 5, 2024
1 parent 7f87c2e commit 9ade2d1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions consensus/src/pipeline/pipeline_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn spawn_ready_fut<T: Send + Clone + 'static>(f: T) -> TaskFuture<T> {

async fn wait_and_log_error<T, F: Future<Output = TaskResult<T>>>(f: F, msg: String) {
if let Err(TaskError::InternalError(e)) = f.await {
warn!("{} failed: {}", msg, e);
error!("[Pipeline] {} failed: {}", msg, e);
}
}

Expand Down Expand Up @@ -630,6 +630,12 @@ impl PipelineBuilder {
block: Arc<Block>,
) -> TaskResult<PostPreCommitResult> {
let compute_result = pre_commit.await?;
info!(
"[Pipeline] Block {} {} {} pre_commit received in post_pre_commit",
block.id(),
block.epoch(),
block.round(),
);
parent_post_pre_commit.await?;

let _tracker = Tracker::new("post_pre_commit", &block);
Expand Down Expand Up @@ -716,7 +722,7 @@ impl PipelineBuilder {
post_ledger_update_fut: _,
commit_vote_fut: _,
pre_commit_fut,
post_pre_commit_fut: _,
post_pre_commit_fut,
commit_ledger_fut,
post_commit_fut: _,
} = all_futs;
Expand All @@ -732,6 +738,11 @@ impl PipelineBuilder {
format!("{epoch} {round} {block_id} pre commit"),
)
.await;
wait_and_log_error(
post_pre_commit_fut,
format!("{epoch} {round} {block_id} post pre commit"),
)
.await;
wait_and_log_error(
commit_ledger_fut,
format!("{epoch} {round} {block_id} commit ledger"),
Expand Down

0 comments on commit 9ade2d1

Please sign in to comment.