Skip to content

Commit

Permalink
Explain better
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Dec 2, 2021
1 parent f218f49 commit 37302eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apollo-router/src/apollo_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ impl ApolloRouter {
// We don't need to do this in background because the old server will keep running until
// this one is ready.
//
// We might lose the benefit of warming the cache up, since it could immediately get some
// queries that could have been precalculated. If we block on warming up, starting the
// router is slightly slower, but when reloading configuration there's no delay, we create
// the router before restarting the server
// If we first warm up the cache in foreground, then switch to the new config, the next
// queries will benefit from the warmed up cache. While if we switch and warm up in
// background, the next queries might be blocked until the cache is primed, so there'll be
// a perf hit.
if let Some(previous_router) = previous_router {
for (query, operation, options) in previous_router.query_planner.get_hot_keys().await {
// We can ignore errors because some of the queries that were previously in the
Expand Down

0 comments on commit 37302eb

Please sign in to comment.