mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #486] Ensure Resolver functions currectly with cache size 0 #204
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#204
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hawkw on GitHub (May 23, 2018).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/486
Conduit uses
trust-dns-resolveras one component of a service discovery system that incorporates multiple information sources, and we implement our own protocol-independent caching on top of it. Therefore, we would like to be able to disable Trust-DNS' caching (see https://github.com/runconduit/conduit/issues/711#issuecomment-385759306 for more information). I suspect there are other use-cases where users might want to disable the resolver's caching.I've done some testing of the
lru-cachecrate that's used to implementresolver'sDnsLrucache, and it appears that setting the cache's size to 0 disables caching without causing any unexpected behaviour there.Test indicating that `lru-cache` works with cache size 0
However, we should also ensure that disabling the cache doesn't break any of
trust-dns-resolver's functionality. In particular, @briansmith suggested in https://github.com/runconduit/conduit/pull/974#issuecomment-391171017 that we should add a test ensuring that CNAME chain resolution works correctly with the cache disabled.@hawkw commented on GitHub (May 23, 2018):
I intend to start on this shortly, but figured it was worth opening an issue to track regardless.
@hawkw commented on GitHub (May 23, 2018):
Ah, so I just looked at the tests in
integration-tests/tests/lookup_tests.rs, and it looks like all the tests already use aCachingClientwith cache size 0, including the tests for CNAME chain lookup:github.com/bluejekyll/trust-dns@0105b8188a/integration-tests/tests/lookup_tests.rs (L242-L274)So it appears this is already resolved! I guess I should have looked closer at the integration tests prior to opening this issue 😓.
/cc @briansmith