Skip to content

Commit d271ad3

Browse files
frankmcsherryclaude
andcommitted
Subgraph build: move child summaries into the reachability builder
PerOperatorState::internal_summary is never read after graph assembly; moving it out avoids cloning every operator's connectivity and releases the retained copies for the dataflow's lifetime. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3290f02 commit d271ad3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

timely/src/progress/subgraph.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ where
167167
// Child 0 has `inputs` outputs and `outputs` inputs, not yet connected.
168168
let summary = (0..outputs).map(|_| PortConnectivity::default()).collect();
169169
builder.add_node(0, outputs, inputs, summary);
170-
for (index, child) in children.iter().enumerate().skip(1) {
171-
builder.add_node(index, child.inputs, child.outputs, child.internal_summary.clone());
170+
for (index, child) in children.iter_mut().enumerate().skip(1) {
171+
let summary = std::mem::take(&mut child.internal_summary);
172+
builder.add_node(index, child.inputs, child.outputs, summary);
172173
}
173174

174175
for (source, target) in self.edge_stash {
@@ -618,7 +619,7 @@ struct PerOperatorState<T: Timestamp> {
618619

619620
shared_progress: Rc<RefCell<SharedProgress<T>>>,
620621

621-
internal_summary: Connectivity<T::Summary>, // cached result from initialize.
622+
internal_summary: Connectivity<T::Summary>, // from initialize; moved into the reachability builder.
622623

623624
logging: Option<Logger>,
624625
}

0 commit comments

Comments
 (0)