-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Plan Caching Improvements #4473
Labels
Comments
12 tasks
This was referenced Feb 7, 2024
Geal
added a commit
that referenced
this issue
Mar 13, 2024
Fix #4473 We want the query plan cache to act like a LRU, so if a TTL is set in its Redis configuration, we will reset the plan cache key's current expiration when reading it. This is now part of the common redis configuration and is enabled by default. For entity caching, this option is disabled, as the cache will manage TTL directly Integration tests now require Redis 7. Otherwise you will get the error "ERR unknown command `EXPIRETIME`"
reopening because we're still missing #4588 |
smyrick
pushed a commit
to smyrick/router
that referenced
this issue
Mar 18, 2024
Fix apollographql#4473 We want the query plan cache to act like a LRU, so if a TTL is set in its Redis configuration, we will reset the plan cache key's current expiration when reading it. This is now part of the common redis configuration and is enabled by default. For entity caching, this option is disabled, as the cache will manage TTL directly Integration tests now require Redis 7. Otherwise you will get the error "ERR unknown command `EXPIRETIME`"
Merged
Geal
added a commit
that referenced
this issue
Apr 5, 2024
Fix #4473 This sets a default TTL for query plan caches, because right now the default is to store query plans indefinitely, which does not make sense because they change with schema updates. The PR is a bit verbose because to add that new default, we need to create a redundant structure for redis configuration Co-authored-by: Iryna Shestak <shestak.irina@gmail.com>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the solution you'd like
The current functionality addresses most needs, but there are a couple of improvements that could be made to help make it more useful.
The first allows for multiple different versions to use the same query plan cache, as different federation versions would generate different query plans in theory.
The second would ensure that stale entries are evicted, but hot query plan paths are retained as long as they are being used in the current schema. For distributed caches, this can minimize the amount of data being used in memory without manual pruning or having to take a performance hit every time the TTL expires.
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: