refactor(dfir_rs,dfir_lang): remove schedule_subgraph's SubgraphId arg, no-op calls, and remove current_subgraph#2811
Open
MingweiSamuel wants to merge 4 commits intomainfrom
Open
Conversation
cafb11d to
1eaa2d7
Compare
Deploying hydro with
|
| Latest commit: |
08d7f92
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a499fa70.hydroflow.pages.dev |
| Branch Preview URL: | https://mingwei-delete-schedule-subg.hydroflow.pages.dev |
1eaa2d7 to
f18330d
Compare
MingweiSamuel
added a commit
that referenced
this pull request
Apr 30, 2026
…urrent_subgraph Remove the unused `sg_id: SubgraphId` parameter from `Context::schedule_subgraph` — inline mode ignores it. Remove `Context::current_subgraph` which always returned a dummy value. Update all operator codegen call sites to drop the `#context.current_subgraph()` argument. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #2811
f18330d to
dff5ea2
Compare
MingweiSamuel
added a commit
that referenced
this pull request
Apr 30, 2026
Remove all `schedule_subgraph(false)` calls from operator codegen — these were no-ops since `schedule_subgraph` only acts when `is_external` is `true`. Clean up the `schedule_subgraph(true)` call in meta_graph.rs formatting. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #2811
MingweiSamuel
added a commit
that referenced
this pull request
Apr 30, 2026
3f07d0e to
c56d8d8
Compare
92141d6 to
8228f3a
Compare
c56d8d8 to
37ebe2e
Compare
8228f3a to
2fda058
Compare
37ebe2e to
af90c89
Compare
2fda058 to
9a6d569
Compare
af90c89 to
094abd4
Compare
9a6d569 to
005e138
Compare
…urrent_subgraph Remove the unused `sg_id: SubgraphId` parameter from `Context::schedule_subgraph` — inline mode ignores it. Remove `Context::current_subgraph` which always returned a dummy value. Update all operator codegen call sites to drop the `#context.current_subgraph()` argument. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #2811
Remove all `schedule_subgraph(false)` calls from operator codegen — these were no-ops since `schedule_subgraph` only acts when `is_external` is `true`. Clean up the `schedule_subgraph(true)` call in meta_graph.rs formatting. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #2811
005e138 to
176446f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the inline DFIR runtime/context API by removing subgraph-ID plumbing that was effectively unused in inline mode, and updates dfir_lang operator codegen accordingly.
Changes:
- Remove
Context::current_subgraph()and drop theSubgraphIdparameter fromContext::schedule_subgraph(...). - Update operator codegen call sites to stop passing
#context.current_subgraph()and to use the newschedule_subgraph(bool)signature where needed. - Adjust inline codegen in
meta_graphto use the new scheduling API.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dfir_rs/src/scheduled/context.rs | Removes current_subgraph and simplifies schedule_subgraph to only accept is_external. |
| dfir_lang/src/graph/ops/spin.rs | Updates to context.schedule_subgraph(true) with new signature. |
| dfir_lang/src/graph/ops/reduce_keyed.rs | Drops old scheduling call (now leaves an empty quote_spanned! arm). |
| dfir_lang/src/graph/ops/reduce.rs | Removes now-unused context binding and removes no-op iterator-after scheduling. |
| dfir_lang/src/graph/ops/persist_mut_keyed.rs | Drops old scheduling call (now leaves an empty write_iterator_after). |
| dfir_lang/src/graph/ops/persist_mut.rs | Drops old scheduling call (now leaves an empty write_iterator_after). |
| dfir_lang/src/graph/ops/persist.rs | Drops old scheduling call (now leaves an empty write_iterator_after). |
| dfir_lang/src/graph/ops/join_fused_lhs.rs | Removes no-op iterator-after scheduling logic. |
| dfir_lang/src/graph/ops/join_fused.rs | Removes now-unused context binding and no-op iterator-after scheduling logic. |
| dfir_lang/src/graph/ops/join.rs | Removes no-op iterator-after scheduling logic. |
| dfir_lang/src/graph/ops/fold_keyed.rs | Drops old scheduling call (now leaves an empty quote_spanned! arm). |
| dfir_lang/src/graph/ops/fold.rs | Removes now-unused context binding and removes no-op iterator-after scheduling. |
| dfir_lang/src/graph/ops/cross_join_multiset.rs | Drops old scheduling call (now leaves dead replay_code / empty tokens). |
| dfir_lang/src/graph/meta_graph.rs | Updates generated inline tick code to call df.schedule_subgraph(true) with new signature. |
Comments suppressed due to low confidence (1)
dfir_lang/src/graph/ops/cross_join_multiset.rs:120
replay_codeis now generated as an emptyTokenStream(only a comment remains), so the wholethen(|| { ... })branch andwrite_iterator_aftereffectively do nothing. Consider removing this dead code (and/or replacing it withNone/Default::default()), and update the comment since no rescheduling happens anymore.
.then(|| {
quote_spanned! {op_span=>
// Reschedule the subgraph lazily to ensure replay on later ticks.
}
});
let write_iterator_after = quote_spanned! {op_span=>
#replay_code
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…bgraph removal Remove now-empty `write_iterator_after` assignments in reduce_keyed.rs, fold_keyed.rs, persist.rs, persist_mut.rs, and persist_mut_keyed.rs. These were left as empty `quote_spanned!` blocks (some with stale "Reschedule the subgraph" comments) after the schedule_subgraph call was removed. Since `..Default::default()` is already used in the OperatorWriteOutput construction, these fields can simply be omitted. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #2811
schedule_subgraph's SubgraphId arg, no-op calls, and remove current_subgraph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
STACK: #2801
Remove the unused
sg_id: SubgraphIdparameter fromContext::schedule_subgraph— inline mode ignores it. RemoveContext::current_subgraphwhich always returned a dummy value.Update all operator codegen call sites to drop the
#context.current_subgraph()argument.