Sitelet https://github.com/PowerDNS/pdns/pull/17897
Skip to content

rec: store scope zero replies in packetcache and modify on retrieval - #17897

Open
omoerbeek wants to merge 8 commits into
PowerDNS:masterfrom
omoerbeek:rec-draft-pc-scope0
Open

rec: store scope zero replies in packetcache and modify on retrieval#17897
omoerbeek wants to merge 8 commits into
PowerDNS:masterfrom
omoerbeek:rec-draft-pc-scope0

Conversation

@omoerbeek

Copy link
Copy Markdown
Member

Short description

This prevents the performance degradation that happens because the PC is no longer used for scope zero answers since #17598.

We now store these answer into the PC, together with the offset and size of the ECS info. On retrieval, the roper client info is then copied into the packet retrieved before sending out.

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)

@rgacogne rgacogne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we probably want to squash 8a1f292 into the first commit to help bisecting tasks.

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>
…16_t> all the time

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek
omoerbeek force-pushed the rec-draft-pc-scope0 branch from 6a6006d to c0a0616 Compare August 18, 2026 12:18
@omoerbeek

Copy link
Copy Markdown
Member Author

Nit: we probably want to squash 8a1f292 into the first commit to help bisecting tasks.

Done

Comment thread pdns/recursordist/pdns_recursor.cc Outdated
Comment thread pdns/recursordist/pdns_recursor.cc
Comment thread pdns/recursordist/pdns_recursor.cc
@coveralls

coveralls commented Aug 18, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32143787083

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 increased (+0.005%) to 71.199%

Details

  • Coverage increased (+0.005%) from the base build.
  • Patch coverage: 10 uncovered changes across 1 file (108 of 118 lines covered, 91.53%).
  • 97 coverage regressions across 13 files.

Uncovered Changes

File Changed Covered %
pdns/recursordist/pdns_recursor.cc 54 44 81.48%
Total (6 files) 118 108 91.53%

Coverage Regressions

97 previously-covered lines in 13 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
pdns/snmp-agent.cc 32 63.64%
pdns/dnsdistdist/dnsdist-snmp.cc 28 55.29%
pdns/recursordist/syncres.cc 10 81.67%
pdns/iputils.cc 6 60.57%
pdns/recursordist/pdns_recursor.cc 4 75.61%
pdns/dnsdistdist/dnsdist-healthchecks.cc 3 54.55%
pdns/logging.cc 3 81.4%
pdns/dnsdistdist/dnsdist-async.cc 2 77.04%
pdns/dnsdistdist/dnsdist-backend.cc 2 68.94%
pdns/recursordist/lwres.cc 2 67.61%

Coverage Stats

Coverage Status
Relevant Lines: 173293
Covered Lines: 135254
Line Coverage: 78.05%
Relevant Branches: 82876
Covered Branches: 47137
Branch Coverage: 56.88%
Branches in Coverage %: Yes
Coverage Strength: 7445738.6 hits per line

💛 - Coveralls

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek
omoerbeek force-pushed the rec-draft-pc-scope0 branch from 1c42a6c to 136665b Compare August 18, 2026 13:40
@omoerbeek
omoerbeek requested a review from pieterlexis August 25, 2026 07:51
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