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): Fix race condition in DistributorChannel #19033

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Sep 30, 2024

The old implementation was racy and could miss the last message(s) sent by the sender right before closing. It would check if there are messages available, and if not if the channel is closed, but between these two checks new messages could've come in.

This only affected the new streaming engine.

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Sep 30, 2024
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.

Project coverage is 79.87%. Comparing base (ab5200d) to head (6da7881).
Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
...stream/src/async_primitives/distributor_channel.rs 0.00% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19033      +/-   ##
==========================================
+ Coverage   79.85%   79.87%   +0.01%     
==========================================
  Files        1524     1524              
  Lines      207734   207749      +15     
  Branches     2908     2908              
==========================================
+ Hits       165891   165938      +47     
+ Misses      41294    41262      -32     
  Partials      549      549              

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

@ritchie46 ritchie46 merged commit 7cfae14 into pola-rs:main Sep 30, 2024
21 of 22 checks passed
@c-peters c-peters added the accepted Ready for implementation label Oct 6, 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 rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants