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

Rework schema queries to be quicker #763

Merged
merged 3 commits into from
Feb 6, 2024
Merged

Conversation

bryanlb
Copy link
Contributor

@bryanlb bryanlb commented Feb 6, 2024

Summary

When building schema for the autocomplete we currently query up to 5 nodes, and then attempt to merge them into a single view of the possible fields. This is susceptible to individual nodes being slow and causing poor query performance, which you can see in the example trace below.

image

As we do not necessarily need all nodes to respond (a single node responding is likely to be sufficient), and this should be an in-memory map result we can aggressively cap the timeout. I've currently left this as a system property, which we may explore moving to a config value at a later date if it's deemed a useful config to expose.

I've also reworked the schema endpoint to use structured concurrency as well, similar to that was done for the search functionality in #704

@bryanlb bryanlb marked this pull request as ready for review February 6, 2024 21:02
@bryanlb bryanlb merged commit d55d87c into master Feb 6, 2024
3 checks passed
@bryanlb bryanlb deleted the bburkholder/faster-schema branch February 6, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants