• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dashbitco / broadway / f52f2f793e16e1c976f5e52adc372457d1445b73
93%

Build:
DEFAULT BRANCH: main
Ran 30 Jul 2025 02:00PM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jul 2025 01:59PM UTC coverage: 92.982% (-0.1%) from 93.119%
f52f2f793e16e1c976f5e52adc372457d1445b73

push

github

web-flow
Fix graceful shutdown race condition (#362)

Currently, when `Topology` is shutting down, it calls `Terminator.trap_exit/1` to allow it to handle `terminate/2` callback and shutdown producers gracefully.
However, `Terminator.trap_exit/1` is using `GenServer.cast/2` which makes it fully asynchronous, making it possible for `Topology`'s
terminate callback to return before `Terminator` starts trapping exits, allowing `Terminator` to be shut down without putting producers into "draining" state.

In my system when we're running ~50-100 Broadway instances we're seeing ~50% of them shutting down properly and the rest of them get stuck with producers
going full blast unaware of the shutdown.

This change simply changes `Terminator.trap_exit/1` to use `GenServer.call/2` instead of `GenServer.cast/2` to make it fully synchronous, which fixed the issue.

2 of 2 new or added lines in 1 file covered. (100.0%)

2 existing lines in 2 files now uncovered.

636 of 684 relevant lines covered (92.98%)

144.51 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
97.01
-0.75% lib/broadway/topology.ex
1
93.33
0.48% lib/broadway/topology/terminator.ex
Jobs
ID Job ID Ran Files Coverage
1 f52f2f793e16e1c976f5e52adc372457d1445b73.1 30 Jul 2025 02:00PM UTC 21
92.98
GitHub Action Run
Source Files on build f52f2f793e16e1c976f5e52adc372457d1445b73
  • Tree
  • List 21
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f52f2f79 on github
  • Prev Build on main (#136BEA67...)
  • Next Build on main (#D32D30DE...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc