router icon indicating copy to clipboard operation
router copied to clipboard

Implemented FederatedQueryGraphBuilders::process_subgraph_schemas

Open TylerBloom opened this issue 1 year ago • 2 comments

This PR addresses FED-199. Specifically, it provides an implementation of FederatedQueryGraphBuilders::process_subgraph_schemas.

TylerBloom avatar May 22 '24 21:05 TylerBloom

CI performance tests

  • [ ] events_big_cap_high_rate_callback - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity using callback mode
  • [ ] reload - Reload test over a long period of time at a constant rate of users
  • [ ] large-request - Stress test with a 1 MB request payload
  • [ ] events - Stress test for events with a lot of users and deduplication ENABLED
  • [x] const - Basic stress test that runs with a constant number of users
  • [x] step - Basic stress test that steps up the number of users over time
  • [ ] events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • [ ] events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • [ ] events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • [ ] no-graphos - Basic stress test, no GraphOS.
  • [ ] events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • [ ] xlarge-request - Stress test with 10 MB request payload
  • [ ] xxlarge-request - Stress test with 100 MB request payload
  • [ ] step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning

router-perf[bot] avatar May 22 '24 21:05 router-perf[bot]

avoid the unwrap() and return Result<&FederatedQueryGraphBuilder, FederationError> from get_builder() instead.

I agree with you, I would also like to remove that unwrap. However, I believe this builder should always have a query graph builder of both kinds. IMO, this should be made explicit. If we change the definition of this builder to what I have below, this unwrap would be completely unnecessary (there are also other benefits, but I think those are pretty minimal).

// Old
pub(crate) struct FederatedQueryGraphBuilders {
    builders: IndexMap<SourceKind, FederatedQueryGraphBuilder>,
}

// New
pub(crate) struct FederatedQueryGraphBuilders {
    graphql: FederatedQueryGraphBuilder, // Always the GraphQL variant
    connect: FederatedQueryGraphBuilder, // Always the Connect variant
}

impl FederatedQueryGraphBuilders {
  fn get_builder(&self, kind: SourceKind) -> &FederatedQueryGraphBuilder {
    match kind { /* Return reference to the corresponding builder */ }
  }
}

TylerBloom avatar May 23 '24 18:05 TylerBloom