Skip to content

events/loop: drain queue on close #124

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
Jun 16, 2025
Merged

Conversation

JoshVanL
Copy link
Contributor

Update looper to drain the Enqueue loop in the event that an error has occurred when Enqueuing. Handle an error'd Run on Close by respecting the closedCh channel.

Fixes a deadlock which can occur in the event a Handle func returns an error, then trying to Close.

Update looper to drain the Enqueue loop in the event that an error has
occurred when Enqueuing. Handle an error'd `Run` on `Close` by
respecting the `closedCh` channel.

Signed-off-by: joshvanl <[email protected]>
@JoshVanL JoshVanL requested review from a team as code owners June 14, 2025 11:00
@JoshVanL JoshVanL marked this pull request as draft June 14, 2025 12:00
Signed-off-by: joshvanl <[email protected]>
@JoshVanL JoshVanL force-pushed the loop-drain-on-close branch from 873b716 to 3374dea Compare June 14, 2025 14:35
@JoshVanL JoshVanL marked this pull request as ready for review June 14, 2025 14:35
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 73.61%. Comparing base (26b564d) to head (3374dea).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
events/loop/loop.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
- Coverage   79.73%   73.61%   -6.13%     
==========================================
  Files          62       82      +20     
  Lines        4768     5852    +1084     
==========================================
+ Hits         3802     4308     +506     
- Misses        811     1365     +554     
- Partials      155      179      +24     

☔ 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.

@cicoyle cicoyle merged commit d7d50a1 into dapr:main Jun 16, 2025
7 of 10 checks passed
@lrascao lrascao mentioned this pull request Jun 17, 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.

5 participants