-
Notifications
You must be signed in to change notification settings - Fork 617
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
fix(frontend): use dedicated runtime to accept connection #16838
fix(frontend): use dedicated runtime to accept connection #16838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It might still be worth noting that if all threads in worker_runtime
are occupied with CPU-intensive queries, even if new connections can be accepted, they can't make any progress.
This could be significant in Cloud free-tier deployment where there's only 1 CPU core thus 1 worker threads.
One thing I can't figure out is why using the same tokio runtime would block the |
src/utils/pgwire/src/pg_server.rs
Outdated
Arc::new(peer_addr), | ||
)); | ||
} | ||
let worker_runtime = tokio::runtime::Handle::current(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangrunji0408 madsim-tokio seems doesn't contain tokio::runtime::Handle
error[E0433]: failed to resolve: could not find `Handle` in `runtime`
--> src/utils/pgwire/src/pg_server.rs:258:42
|
258 | let worker_runtime = tokio::runtime::Handle::current();
| ^^^^^^ could not find `Handle` in `runtime`
I guess there's some sense of affinity mechanism for the I/O driver, as described in #9019
Can also refer to tokio-rs/tokio#4730. |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.