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

fix: Fix sink_ipc_cloud panicking with runtime error #18091

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

philss
Copy link
Contributor

@philss philss commented Aug 8, 2024

Fixes #13614

When writing to ObjectStore-compatible storage using the IPC format, it seems like the block_on calls inside the constructed CloudWriter might sometimes get called inside another block_on call. Tokio does not like this, resulting in a panic.

This PR resolves this issue by using block_on_potential_spawn in the necessary places instead.

This is a fix that was originally written by @Qqwy in another PR: #14262

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Aug 8, 2024
@philss philss force-pushed the ps-fix-sink-ipc-cloud-tokio-runtime branch 2 times, most recently from 57bd7bc to 95cd14f Compare August 8, 2024 04:57
Fixes pola-rs#13614

When writing to ObjectStore-compatible storage using the IPC format,
it seems like the `block_on` calls inside the constructed `CloudWriter`
might sometimes get called inside another `block_on` call.
Tokio does not like this, resulting in a panic.

This PR resolves this issue by using `block_on_potential_spawn`
in the necessary places instead.

This is a fix that was originally written by @Qqwy in another PR:
pola-rs#14262

Co-Authored-By: Qqwy / Marten <qqwy@gmx.com>
@philss philss force-pushed the ps-fix-sink-ipc-cloud-tokio-runtime branch from 95cd14f to 6d59c77 Compare August 8, 2024 05:10
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 9.09091% with 50 lines in your changes missing coverage. Please review.

Project coverage is 80.36%. Comparing base (3dda47e) to head (6d59c77).

Files Patch % Lines
.../polars-pipe/src/executors/sinks/output/parquet.rs 0.00% 29 Missing ⚠️
...ates/polars-pipe/src/executors/sinks/output/ipc.rs 0.00% 20 Missing ⚠️
crates/polars-io/src/cloud/adaptors.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18091      +/-   ##
==========================================
- Coverage   80.37%   80.36%   -0.01%     
==========================================
  Files        1496     1496              
  Lines      197542   197542              
  Branches     2820     2820              
==========================================
- Hits       158771   158758      -13     
- Misses      38249    38262      +13     
  Partials      522      522              

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

@ritchie46 ritchie46 merged commit 9edb28a into pola-rs:main Aug 8, 2024
21 checks passed
@ritchie46
Copy link
Member

Thanks @philss and @Qqwy

@philss philss deleted the ps-fix-sink-ipc-cloud-tokio-runtime branch August 8, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sink IPC cloud panics with "Tokio runtime error"
2 participants