router
router copied to clipboard
Implemented FederatedQueryGraphBuilders::process_subgraph_schemas
This PR addresses FED-199. Specifically, it provides an implementation of FederatedQueryGraphBuilders::process_subgraph_schemas.
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
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 */ }
}
}