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 CloudWriter to use buffer before making requests #18027

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

philss
Copy link
Contributor

@philss philss commented Aug 2, 2024

The issue started after the bump of ObjectStore to v0.10. Before that, ObjectStore was doing an internal buffer.

The implementation is using ObjectStore::BufWriter, that is going to perform a "put" request if the size of data is below the "capacity". Otherwise it is going to do a "put multipart" instead.

Fixes #17172

The issue started after the bump of `ObjectStore` to v0.10. Before that,
ObjectStore was doing an internal buffer.

The implementation is using `ObjectStore::BufWriter`, that is going to
perform a "put" request if the size of data is below the "capacity".
Otherwise it is going to do a "put multipart" instead.

Fixes pola-rs#17172
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Aug 3, 2024
Copy link

codecov bot commented Aug 3, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.50%. Comparing base (d5265d3) to head (7850e30).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/polars-io/src/cloud/adaptors.rs 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18027      +/-   ##
==========================================
+ Coverage   80.49%   80.50%   +0.01%     
==========================================
  Files        1496     1496              
  Lines      196786   196786              
  Branches     2817     2817              
==========================================
+ Hits       158407   158427      +20     
+ Misses      37858    37838      -20     
  Partials      521      521              

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

@@ -7,4 +7,6 @@ edition = "2021"

[dependencies]
aws-creds = "0.36.0"
polars = { path = "../../crates/polars", features = ["lazy", "aws", "parquet", "cloud_write"] }
polars = { path = "../../crates/polars", features = ["lazy", "aws", "parquet", "cloud_write", "streaming"] }
Copy link
Member

Choose a reason for hiding this comment

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

Why does this need streaming?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I'm getting this error when streaming is disabled:

thread 'main' panicked at /Users/philip/polars/crates/polars-lazy/src/frame/mod.rs:625:17:
activate feature 'streaming'

Copy link
Member

Choose a reason for hiding this comment

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

Ah.. Fair enough!

@ritchie46
Copy link
Member

Alright. Thanks.

@ritchie46 ritchie46 merged commit 08311b9 into pola-rs:main Aug 6, 2024
22 checks passed
@philss philss deleted the ps-fix-cloud-writer branch August 6, 2024 13:37
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_parquet_cloud doesnt work when updating from 0.40 -> 0.41
2 participants