Skip to content

rec: keep cache warm for a list of names#17360

Open
omoerbeek wants to merge 14 commits into
PowerDNS:masterfrom
omoerbeek:rec-warmcache
Open

rec: keep cache warm for a list of names#17360
omoerbeek wants to merge 14 commits into
PowerDNS:masterfrom
omoerbeek:rec-warmcache

Conversation

@omoerbeek

@omoerbeek omoerbeek commented May 13, 2026

Copy link
Copy Markdown
Member

Short description

This is different from refresh-on-ttl-perc as it does not require a name/qtype to be queried to kick the refresh.

List is a keepwarm key in the recordcache section. Value is a list, for example:

recordcache:
  keepwarm:
    - qname: google.com
    - qname: microsoft.com

If you have lots of names in the list you'll see taskqueue-expired grow and taskqueue-size never hitting zero. In that case increase the new recursor.taskthreads setting.

Draft as tests and docs are missing.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

Comment thread pdns/recursordist/rec-main.cc Outdated
Comment thread pdns/recursordist/rec-main.cc Outdated
Comment thread pdns/recursordist/rec-main.cc Outdated
@coveralls

coveralls commented May 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 27267339905

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 71.116%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 41 uncovered changes across 4 files (246 of 287 lines covered, 85.71%).
  • 83 coverage regressions across 16 files.

Uncovered Changes

File Changed Covered %
pdns/recursordist/rec-main.cc 113 92 81.42%
pdns/recursordist/syncres.cc 96 81 84.38%
pdns/recursordist/rec-keepwarm.hh 26 23 88.46%
pdns/recursordist/rec-taskqueue.cc 9 7 77.78%
Total (11 files) 287 246 85.71%

Coverage Regressions

83 previously-covered lines in 16 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
pdns/recursordist/syncres.cc 23 81.1%
pdns/recursordist/rec-system-resolve.cc 19 49.32%
pdns/misc.cc 8 61.78%
pdns/recursordist/taskqueue.cc 5 64.1%
pdns/dnsdistdist/dnsdist-carbon.cc 4 59.56%
pdns/recursordist/recpacketcache.hh 3 91.14%
pdns/recursordist/taskqueue.hh 3 85.71%
pdns/recursordist/test-syncres_cc2.cc 3 79.35%
pdns/rcpgenerator.cc 2 89.45%
pdns/recursordist/lwres.cc 2 67.77%

Coverage Stats

Coverage Status
Relevant Lines: 171043
Covered Lines: 133315
Line Coverage: 77.94%
Relevant Branches: 81710
Covered Branches: 46433
Branch Coverage: 56.83%
Branches in Coverage %: Yes
Coverage Strength: 5882899.41 hits per line

💛 - Coveralls

Comment thread pdns/recursordist/rec-main.cc Outdated
@omoerbeek

Copy link
Copy Markdown
Member Author

Rebased to fix conflicts

@omoerbeek omoerbeek force-pushed the rec-warmcache branch 4 times, most recently from 24898f4 to 302b787 Compare June 2, 2026 12:20
omoerbeek and others added 12 commits June 9, 2026 14:04
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
…half the TTL has passed

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek omoerbeek force-pushed the rec-warmcache branch 2 times, most recently from c06a64b to 9c6fd12 Compare June 9, 2026 13:02
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek omoerbeek marked this pull request as ready for review June 10, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants