Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CO] fix pipeline futures #16119

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions consensus/src/consensus_observer/observer/consensus_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,22 +272,29 @@ impl ConsensusObserver {
);

if self.pipeline_enabled() {
for block in ordered_block.blocks() {
let commit_callback = self.active_observer_state.create_commit_callback(
self.ordered_block_store.clone(),
self.block_payload_store.clone(),
);
if let Some(futs) = self.get_parent_pipeline_futs(block) {
self.pipeline_builder().build(block, futs, commit_callback);
} else {
warn!(
let block = ordered_block.first_block();
let mut parent_fut = if let Some(futs) = self.get_parent_pipeline_futs(&block) {
Some(futs)
} else {
warn!(
LogSchema::new(LogEntry::ConsensusObserver).message(&format!(
"Parent block's pipeline futures for ordered block is missing! Ignoring: {:?}",
ordered_block.proof_block_info()
))
);
return;
}
return;
};
for block in ordered_block.blocks() {
let commit_callback = self.active_observer_state.create_commit_callback(
self.ordered_block_store.clone(),
self.block_payload_store.clone(),
);
self.pipeline_builder().build(
block,
parent_fut.take().expect("future should be set"),
commit_callback,
);
parent_fut = Some(block.pipeline_futs().expect("pipeline futures just built"));
}
}
// Create the commit callback (to be called after the execution pipeline)
Expand Down
3 changes: 2 additions & 1 deletion consensus/src/pipeline/buffer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ impl BufferManager {
} = ordered_blocks;

info!(
"Receive ordered block {}, the queue size is {}",
"Receive {} ordered block ends with {}, the queue size is {}",
ordered_blocks.len(),
ordered_proof.commit_info(),
self.buffer.len() + 1,
);
Expand Down
Loading