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

dnsimple / erldns / 21874370281
87%

Build:
DEFAULT BRANCH: main
Ran 10 Feb 2026 04:58PM UTC
Jobs 1
Files 50
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

10 Feb 2026 04:57PM UTC coverage: 87.203% (-0.6%) from 87.849%
21874370281

push

github

web-flow
Add pipeline suspension for non-blocking async operations (#327)

* Add pipeline suspension for non-blocking async operations

Introduce a suspension mechanism that allows pipeline stages to perform
blocking operations without stalling worker pools. This enables features
like external lookups to other nameservers or even databases, in a
non-blocking manner.

Architecture:

Pipeline stages can now return `{suspend, Msg, Opts, AsyncFun}` to pause
execution. The `AsyncFun` captures the blocking work to perform and returns
a standard pipeline return type when complete.

Transport handling differs by design:
- UDP: Suspensions hand off to `erldns_async_pool`, worker returns immediately
- TCP: Executes synchronously (dedicated per-request process)

The async pool is a bounded wpool (~4x schedulers) with CoDel queue
management to drop stale requests under load. Workers execute the blocking
`AsyncFun`, then send the result back to the original requester worker which
resumes the remaining pipeline.

Key changes:

- `erldns_pipeline`: New `{suspend, Msg, Opts, AsyncFun}` return type
  with continuation record for capturing execution state. Async work has
  a 3-deep chain limit to prevent infinite suspension loops. The module
  documentation for `erldns_pipeline` becomes now sufficiently
  complicated, and therefore it's moved to a separate markdown file at
  `src/pipes/erldns_pipeline.md` and integrated into the module.

- `erldns_async_pool`: New bounded worker pool using wpool. Receives
  continuations from UDP workers, executes blocking work, returns
  results via `gen_server:cast/2`. CoDel prevents queue buildup during
  overload.

- `erldns_proto_udp`: Handles `{suspend, Continuation}` by casting to
  async pool and returning immediately. Receives `{async_done,
  Continuation}` to resume pipeline and send response.

- `erldns_proto_tcp_request`: Handles `{suspend, Continuation}` by
  calling resume_pipeline synchronously - blocking is acceptable in
  dedic... (continued)

111 of 146 new or added lines in 7 files covered. (76.03%)

1 existing line in 1 file now uncovered.

1690 of 1938 relevant lines covered (87.2%)

1574.38 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
96.3
-1.4% src/pipes/erldns_pipeline.erl
4
85.14
-2.58% src/listeners/udp/erldns_proto_udp.erl
11
77.01
4.7% src/erldns_handler.erl
18
61.7
src/pipes/erldns_async_pool.erl

Uncovered Existing Lines

Lines Coverage ∆ File
1
85.14
-2.58% src/listeners/udp/erldns_proto_udp.erl
Jobs
ID Job ID Ran Files Coverage
1 21874370281.1 10 Feb 2026 04:58PM UTC 50
87.2
GitHub Action Run
Source Files on build 21874370281
  • Tree
  • List 50
  • Changed 12
  • Source Changed 9
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21874370281
  • 8dfb8560 on github
  • Prev Build on main (#21826208716)
  • Next Build on main (#21874633203)
  • 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