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

dnsimple / erldns / 22856089477 / 1
87%
main: 87%

Build:
DEFAULT BRANCH: main
Ran 09 Mar 2026 01:40PM UTC
Files 50
Run time 1s
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

09 Mar 2026 01:37PM UTC coverage: 86.653% (-0.4%) from 87.028%
22856089477.1

push

github

web-flow
Zone cache performance and correctness (#333)

* feat: add zone_name_existence and one-shot resolved lookups

- Add `zone_name_existence/2` returning exact | wildcard | ent |
  nxdomain in a single pass, with ENT blocking wildcard per RFC 4592.
- Add `get_records_by_name_resolved/2` and
  `get_records_by_name_and_type_resolved/3` returning ent | nxdomain |
  {exact, Records} | {wildcard, Records} so callers get both
  classification and records in one tree traversal.

How do the optimisations work:
- Replace `pattern_zone_dname_count` with `pattern_zone_dname_exists`
  (select limit 1) for existence checks. `pattern_zone_dname_exists`
  uses `ets:select/3` with limit 1 instead of `ets:select_count`. The
  engine stops after the first match, so a name with several types (e.g.
  A, AAAA, MX, TXT, RRSIG) is one ETS visit instead of counting all. The
  match spec uses `'_'` for the value so no record data is copied.
- Zone labels: reduce_record_labels_pre_reversed uses the zone’s
  reversed_labels (set at zone loading) so we no longer call
  lists:reverse(ZoneLabels) on every lookup; only the query's labels are
  reversed.
- Single-pass existence: zone_name_existence_1 does one traversal (exact
  then ENT then optional wildcard climb) and returns a single
  classification. The old code could do two full traversals (e.g.
  `is_record_name_in_zone` then `is_record_name_in_zone_strict` for
  ENT/NXDOMAIN). ENT now costs 2 ETS calls; NXDOMAIN 2+2N instead of
  4+4N. The wildcard climb uses one recursive function and
  lists:reverse/2 to build the wildcard path in one go instead of
  droplast + append; parent is O(1) by dropping the head of the reversed
  path.

* Optimise erldns_dnssec pipe

Use better functions from erldns_zone_cache and reduce redundant domain
handling by reusing already normalised and split information stored in
the pipe options.

* Optimise erldns_resolver pipe

Use better functions from erldns_zone_cache

* Use first instead of last wher... (continued)

1714 of 1978 relevant lines covered (86.65%)

1431.49 hits per line

Source Files on job 22856089477.1
  • Tree
  • List 50
  • Changed 8
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22856089477
  • e7a7a384 on github
  • Prev Job for on main (#22354907527.1)
  • Next Job for on main (#22901787809.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