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

refactor(rust): Add fundamentals for new async-based streaming execution engine #16884

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Jun 11, 2024

This adds to the codebase (but yet in no way actually uses) a bespoke efficient async executor that supports task priority, as well as several async primitives which will be useful for implementing our async-based streaming execution engine ideas.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jun 11, 2024
Copy link

codspeed-hq bot commented Jun 11, 2024

CodSpeed Performance Report

Merging #16884 will not alter performance

Comparing streaming-engine (46caca5) with main (f7cca90)

Summary

✅ 37 untouched benchmarks

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.42%. Comparing base (47d19f3) to head (46caca5).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16884      +/-   ##
==========================================
+ Coverage   81.41%   81.42%   +0.01%     
==========================================
  Files        1425     1425              
  Lines      187964   187973       +9     
  Branches     2704     2704              
==========================================
+ Hits       153022   153056      +34     
+ Misses      34445    34420      -25     
  Partials      497      497              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


fn global() -> &'static Executor {
GLOBAL_SCHEDULER.get_or_init(|| {
let mut n_threads = NUM_EXECUTOR_THREADS.load(Ordering::Relaxed);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should respect the POLARS_MAX_THREADS env var if set.

Copy link
Collaborator Author

@orlp orlp Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if we keep Polars-specific stuff out of the executor itself, we'll just call executor::set_num_threads.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then that is a note to us that we must do that on startup or query conversion.

crates/polars-stream/src/executor/mod.rs Outdated Show resolved Hide resolved
crates/polars-stream/src/executor/task.rs Show resolved Hide resolved
crates/polars-stream/src/executor/mod.rs Show resolved Hide resolved
crates/polars-stream/src/executor/mod.rs Show resolved Hide resolved
crates/polars-stream/src/executor/mod.rs Show resolved Hide resolved
@ritchie46 ritchie46 merged commit 2dba716 into main Jun 12, 2024
21 checks passed
@ritchie46 ritchie46 deleted the streaming-engine branch June 12, 2024 11:35
@c-peters c-peters added the accepted Ready for implementation label Jun 16, 2024
@stinodego stinodego changed the title feat: add fundamentals for new async-based streaming execution engine refactor: Add fundamentals for new async-based streaming execution engine Jun 30, 2024
@stinodego stinodego removed the enhancement New feature or an improvement of an existing feature label Jun 30, 2024
@github-actions github-actions bot added the internal An internal refactor or improvement label Jun 30, 2024
@stinodego stinodego changed the title refactor: Add fundamentals for new async-based streaming execution engine refactor(rust): Add fundamentals for new async-based streaming execution engine Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants