Skip to content
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

distributed Query Plan cache may be poisoned by experimental query plan features #5093

Closed
fotoetienne opened this issue May 6, 2024 · 2 comments · Fixed by #5100
Closed

Comments

@fotoetienne
Copy link
Contributor

Describe the bug
If a router instance is sharing a distributed cache with other router instances, and one router instance used experimental query plan features, the resulting query plans will be cached with the same id as query plans that are not using the experimental features.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy a cluster of router instances sharing a distributed cache
  2. Deploy a single instance of the router (sharing the same distributed cache) that is configured to use experimental query plan features such as generate_query_fragments
  3. Issue a request against the new router instance and then the same query against the other instances
  4. All instances will issue a query using the experimental query plan feature

Expected behavior
Query plans created with different federation versions and federation options will be cached with a unique key

@fotoetienne
Copy link
Contributor Author

A proposed solution is to add QueryPlannerConfig to CachingQueryKey (PR). Thoughts?

@Geal
Copy link
Contributor

Geal commented May 7, 2024

yes, adding it to the cache key is the right approach here

BrynCooke pushed a commit that referenced this issue May 9, 2024
Related to #5093 this will allow us to follow up to insert the hash of the query plan config into the cache key for query plans.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants