Skip to content

Commit 3f7b6e4

Browse files
committed
[dbsp] Fix CircuitHandle::is_replay_complete.
Bootstrapping is considered completed when all replay sources are complete and the bootstrapping transaction has committed. The latter condition was missing. This did not cause any issues because we only called this function between transactions. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
1 parent d0ebf7b commit 3f7b6e4

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

crates/dbsp/src/circuit/circuit_builder.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7607,10 +7607,16 @@ impl CircuitHandle {
76077607
return true;
76087608
};
76097609

7610-
replay_info.replay_sources.keys().all(|node_id| {
7610+
// Bootstrapping is finished when all replay sources have completed their replay and the
7611+
// transaction has been committed.
7612+
7613+
let all_complete = replay_info.replay_sources.keys().all(|node_id| {
76117614
self.circuit
76127615
.map_local_node_mut(*node_id, &mut |node| node.is_replay_complete())
7613-
})
7616+
});
7617+
7618+
all_complete && self.is_commit_complete()
7619+
76147620
}
76157621

76167622
/// Finalize the replay phase of the circuit.

0 commit comments

Comments
 (0)