-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Generate Tokio Runtime in ExecutionContext #928
Comments
FYI @alamb as this also has impact on IOx |
If we go this approach, care must be taken to ensure any newly created executor does not interfere with one created with Here is an example of such a dedicated tokio executor that we made in IOx: https://github.com/influxdata/influxdb_iox/blob/main/query/src/exec/task.rs#L48-L65 I would be willing to contribute the |
In case anyone is interested: https://docs.rs/tokio/1.12.0/tokio/#cpu-bound-tasks-and-blocking-code Is upgraded to say that using a separate tokio executor is not a bad idea:
|
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently a Tokio runtime is created outside of the control of DataFusion, and requires another user to specify a
#[tokio::main]
or a custom runtime.The downside of this is that the config is outside of the control of DataFusion and depends on it being configured externally.
Describe the solution you'd like
Create a custom
Runtime
when creating the execution context.Here we can also configure the worker thread count and max threads for the blocking thread pool based on a config or on number of CPU cores.
Possibly, for some usecases it would be nice to allow plugging in a runtime (e.g. when you want to share the runtime).
Describe alternatives you've considered
Additional context
Related to #924
The text was updated successfully, but these errors were encountered: