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

dashbitco / broadway / f52f2f793e16e1c976f5e52adc372457d1445b73 / 1
93%
main: 93%

Build:
DEFAULT BRANCH: main
Ran 30 Jul 2025 02:00PM UTC
Files 21
Run time 0s
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.1

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.

636 of 684 relevant lines covered (92.98%)

144.51 hits per line

Source Files on job f52f2f793e16e1c976f5e52adc372457d1445b73.1
  • Tree
  • List 21
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 0
  • f52f2f79 on github
  • Prev Job for on main (#136bea6786ae1526721a98a93ca9d752543c3a7d.1)
  • Next Job for on main (#d32d30deb64dc4481f2743f6a0d8606299690046.1)
  • 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

© 2026 Coveralls, Inc