Skip to content

Conversation

@sachindshinde
Copy link
Contributor

No description provided.

@sachindshinde sachindshinde requested review from a team as code owners October 24, 2025 21:35
@apollo-librarian
Copy link

apollo-librarian bot commented Oct 24, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 0d87603aead88469ae50a455
Build Logs: View logs

@github-actions
Copy link
Contributor

@sachindshinde, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@sachindshinde sachindshinde force-pushed the sachin/track-path-weight-in-qp branch 3 times, most recently from 09382ed to 6149f96 Compare October 28, 2025 19:00
@sachindshinde sachindshinde force-pushed the sachin/track-path-weight-in-qp branch from 6149f96 to 09958a0 Compare October 29, 2025 17:05
@sachindshinde sachindshinde force-pushed the sachin/track-path-weight-in-qp branch from 09958a0 to 3fb0eb6 Compare October 29, 2025 20:03
Copy link
Contributor

@duckki duckki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great! I just have a few remarks, but those are not a blocker.
Besides, I wish we studied the co-releation between high water mark and the actual max memory used.
BTW, we don't report high water mark from composition. That is something we would like to do once we finish porting composition.

// Add options as needed - for now keeping it minimal
/// Maximum allowable number of outstanding subgraph paths to validate during satisfiability.
pub(crate) max_validation_subgraph_paths: Option<usize>,
/// Maximum allowable number of in-memory paths (weighted by path size) during satisfiability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's a good time to move CompositionOptions to composition/mod.rs?

/// A counter on the total weight of graph paths in use by the current task (e.g. query planning
/// or composition). This is here to facilitate dropping and graph paths derived from this one.
#[serde(skip)]
weight_counter: Arc<GraphPathWeightCounter>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The weight counter system makes sense. It's quite similar to custom allocator with a total size metric.

Just a thought: I'm afraid it may be too easy to forget increasing this counter at all construction sites. Wouldn't it be a good idea to make this counter a wrapper type like Weighed<GraphPath<...>>? And it may be reusable, too.

And it's quite fun to continue this analogy...

  • struct Weighed: one item that has a weight and put on a Scale.
  • Arc<Scale>: the sum of all weights with a limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants