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

switch between two query planner instances #3121

Open
Geal opened this issue May 22, 2023 · 1 comment
Open

switch between two query planner instances #3121

Geal opened this issue May 22, 2023 · 1 comment

Comments

@Geal
Copy link
Contributor

Geal commented May 22, 2023

right now we only use one query planner instance, in one deno VM, to prevent some reliability issues. Unfortunately, that introduced another reliability issue: when the query planner loads a new schema, new queries have to wait before they can be planned.
Proposal: set up two query planner instances, one active serving queries, the other one waiting. When a new schema comes in, the waiting instance starts loading the schema while the active one serves current queries. When the waiting instance is fully loaded, they switch places, it becomes the active one.

@gwardwell
Copy link

Even if it ends up with multiple instances for real-time query planning (which I think is a must-have) I would have a dedicated instance for rebuilding the query plan cache during the schema refresh process. I think getting that decoupled from real-time operations would do a lot for preventing the latency spikes we see during schema refreshes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants