Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rec: if the full CNAME chain leading to the answer is cached, indicate that #14973

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

omoerbeek
Copy link
Member

Alternative approach to PR #14918 from @zjs604381586.

I find the approach to be more clear. Once we agree which one is best, I'll add a unit test.

Short description

Checklist

I have:

  • read the CONTRIBUTING.md document
  • 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)

@omoerbeek omoerbeek requested a review from rgacogne December 16, 2024 10:23
@coveralls
Copy link

coveralls commented Dec 16, 2024

Pull Request Test Coverage Report for Build 12370453034

Details

  • 109 of 120 (90.83%) changed or added relevant lines in 2 files are covered.
  • 48 unchanged lines in 13 files lost coverage.
  • Overall coverage increased (+3.6%) to 64.817%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pdns/recursordist/test-syncres_cc1.cc 88 92 95.65%
pdns/recursordist/syncres.cc 21 28 75.0%
Files with Coverage Reduction New Missed Lines %
pdns/ueberbackend.cc 1 82.03%
modules/gpgsqlbackend/gpgsqlbackend.cc 1 88.62%
pdns/recursordist/syncres.cc 1 80.21%
pdns/recursordist/aggressive_nsec.cc 2 66.32%
modules/lmdbbackend/lmdbbackend.cc 2 72.54%
pdns/misc.cc 2 64.57%
pdns/misc.hh 3 87.62%
modules/gpgsqlbackend/spgsql.cc 3 67.94%
pdns/dnsdistdist/dnsdist.cc 4 68.93%
pdns/recursordist/test-syncres_cc1.cc 5 89.95%
Totals Coverage Status
Change from base Build 12369518911: 3.6%
Covered Lines: 126108
Relevant Lines: 163770

💛 - Coveralls

Copy link
Member

@rgacogne rgacogne left a comment

Choose a reason for hiding this comment

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

Looks nice, I would love a test :)

pdns/recursordist/syncres.cc Outdated Show resolved Hide resolved
pdns/recursordist/syncres.cc Outdated Show resolved Hide resolved
Co-authored-by: Remi Gacogne <github@coredump.fr>
Copy link
Contributor

@zjs604381586 zjs604381586 left a comment

Choose a reason for hiding this comment

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

This solution looks better than mine.
For example, if there are multiple layers of cname cache for the domain name in the cache, and the last cname has an A record or the last cname has no record cache, if the AAAA type is requested at this time, it looks like in step 0 cache lookup, only the AAAA type of the last cname is resolved through the network, and the others will be returned through the cache. You can test it.

The last step of the test shows that there is likely room for more improvement.
@omoerbeek omoerbeek force-pushed the rec-full-cname-chain-cached branch from 73e5d93 to f533aca Compare December 17, 2024 09:49
@omoerbeek omoerbeek merged commit 4c1029f into PowerDNS:master Dec 17, 2024
77 checks passed
@omoerbeek omoerbeek deleted the rec-full-cname-chain-cached branch December 17, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants