-
-
Notifications
You must be signed in to change notification settings - Fork 148
chore: improve query performance #1367
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
chore: improve query performance #1367
Conversation
- create missing streams concurrently - create stream metadata and schema for a stream concurrently this will improve performance for each query call
WalkthroughThe changes refactor stream and schema creation logic to improve concurrency and error handling. The Changes
Sequence Diagram(s)sequenceDiagram
participant Querier
participant Storage
participant TokioTasks
Querier->>Querier: create_streams_for_querier()
Querier->>Storage: fetch storage streams (async)
Querier->>Querier: compare with existing streams
alt Missing streams
loop For each missing stream
Querier->>TokioTasks: spawn async task to create stream & schema
TokioTasks->>Storage: fetch stream metadata & schema (parallel)
Storage-->>TokioTasks: return metadata & schema
TokioTasks->>Querier: log success or warning
end
Querier->>TokioTasks: await all tasks
end
Querier->>Querier: return Ok or propagate error
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings
src/parseable/mod.rs (4)
src/handlers/http/query.rs (3)
⏰ Context from checks skipped due to timeout of 90000ms (10)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
this will improve performance for each query call
Summary by CodeRabbit
Bug Fixes
Refactor