8000 Fix task leak by allevo · Pull Request #292 · rabbitmq/rabbitmq-stream-rust-client · GitHub
[go: up one dir, main page]

Skip to content

Fix task leak #292

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

Merged
merged 2 commits into from
May 29, 2025
Merged

Fix task leak #292

merged 2 commits into from
May 29, 2025

Conversation

allevo
Copy link
Collaborator
@allevo allevo commented May 29, 2025

The channel never closed because the sender reference is kept by MessageAccumulator. That means schedule_batch_send loop never ends, so the lib creates a leak. This PR fixes this issue by removing the MessageAccumulator structure.
We also test how close and drop work on clone:

  • close closes the underlying client, so every "linked" producer will be closed.
  • drop closes the underlying client only if it is the last one.

Thanks for the help: @wolf4ood @cc90202

Fix #287

Copy link
codecov bot commented May 29, 2025

Codecov Report

Attention: Patch coverage is 83.92857% with 9 lines in your changes missing coverage. Please review.

Project coverage is 89.16%. Comparing base (ccabc93) to head (b2c9bd9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/producer.rs 83.92% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #292      +/-   ##
==========================================
+ Coverage   88.92%   89.16%   +0.23%     
==========================================
  Files          81       81              
  Lines        7541     7532       -9     
==========================================
+ Hits         6706     6716      +10     
+ Misses        835      816      -19     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator
@wolf4ood wolf4ood left a comment

Choose a reason for hiding this comment

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

🚀

< AE45 path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" />

@Gsantomaggio Gsantomaggio merged commit e0cc5a5 into main May 29, 2025
2 of 3 checks passed
@Gsantomaggio Gsantomaggio deleted the feat/fix-leak branch May 29, 2025 11:09
@github-actions github-actions bot mentioned this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File Descriptor Leak in Producer
3 participants
0