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: Resolve deadlock due to leaking in Connector recv drop #21296

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Feb 17, 2025

This fixes a bug that made values in the Connector channel leak if the receiver was dropped before the value was received.

In the receiver drop it now:

  1. Prevents a new value from entering the channel.
  2. Eagerly drops the value if there's still a value in the channel.
  3. Wakes the sender.

The reason this resolves a deadlock is because we were sending WaitTokens that we rely on dropping through the channel. If those aren't dropped the associated WaitGroup will never unblock.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Feb 17, 2025
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.89%. Comparing base (7f0bfa1) to head (c54255a).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21296      +/-   ##
==========================================
+ Coverage   79.80%   79.89%   +0.09%     
==========================================
  Files        1596     1596              
  Lines      228475   228562      +87     
  Branches     2607     2608       +1     
==========================================
+ Hits       182335   182613     +278     
+ Misses      45544    45353     -191     
  Partials      596      596              

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

@coastalwhite coastalwhite merged commit 3e28786 into pola-rs:main Feb 17, 2025
24 checks passed
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.

2 participants