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

emqx / mria / 1183
57%
release-1-1: 57%

Build:
Build:
LAST BUILD BRANCH: 261014-middleman-threshold-100
DEFAULT BRANCH: release-1-1
Ran 14 Oct 2026 12:26PM UTC
Jobs 1
Files 30
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

14 Oct 2026 11:57AM UTC coverage: 50.745% (-0.05%) from 50.79%
1183

push

github

zmstone
feat: let the caller decide whether a write runs in a middleman process

Since b857b2a every write operation runs in a helper process when the
caller's message queue has `max_mql' (default 10) or more messages. The
helper protects mnesia transactions: their commit stage does receives
without the ref trick, so each receive scans the whole queue. A dirty
operation on a table with a local copy never waits for a message, so for
it the helper is pure cost: a spawn, a monitor, and a wait for the helper
to be scheduled. On a loaded node that wait is a run-queue round trip
per write.

This adds the `middleman' option, `#{middleman => boolean()}', as a new
last argument of transaction/4, async_dirty/4, sync_dirty/4,
dirty_write/3, dirty_delete/3, dirty_delete_object/3 and
dirty_update_counter/4. `false' runs the operation in the caller, `true'
always uses the helper, and an absent option keeps the queue-length
check. The existing arities are unchanged.

EMQX will pass `middleman => false' for the route writes that the broker
pool workers do on the v3 routing schema, where the tables are local
content merge tables. Under a subscribe load of about 10,000 new routes
per second per node, one route write in ten already took the helper
detour with the default threshold.

11 of 22 new or added lines in 1 file covered. (50.0%)

1226 of 2416 relevant lines covered (50.75%)

1658.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
33.08
0.41% src/mria.erl
Jobs
ID Job ID Ran Files Coverage
1 1183.1 14 Oct 2026 12:26PM UTC 30
50.75
GitHub Action Run
Source Files on build 1183
  • Tree
  • List 30
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 32182a8c on github
  • Prev Build on (#1154)
  • Next Build on (#1185)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc