mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #3228] [CLOSED] Introduce trait for storage backing authoritative zones #3658
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#3658
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?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/3228
Author: @divergentdave
Created: 8/26/2025
Status: ❌ Closed
Base:
main← Head:david/authoritative-zone-storage-trait📝 Commits (4)
11dd690Add StoreBackend traitffe377eSplit up InMemoryAuthorityd529976Split up FileAuthority74f04faSplit up SqliteAuthority📊 Changes
25 files changed (+3054 additions, -3256 deletions)
View changed files
📝
bin/src/lib.rs(+22 -16)📝
bin/tests/integration/in_memory.rs(+2 -2)📝
bin/tests/integration/store_file_tests.rs(+20 -10)📝
bin/tests/integration/store_sqlite_tests.rs(+19 -10)📝
bin/tests/integration/txt_tests.rs(+11 -39)➕
crates/server/src/store/authoritative.rs(+1411 -0)📝
crates/server/src/store/file.rs(+104 -229)➖
crates/server/src/store/in_memory/inner.rs(+0 -869)📝
crates/server/src/store/in_memory/mod.rs(+84 -780)📝
crates/server/src/store/metrics.rs(+12 -11)📝
crates/server/src/store/mod.rs(+896 -0)📝
crates/server/src/store/sqlite/mod.rs(+187 -1116)📝
tests/integration-tests/src/example_authority.rs(+112 -64)📝
tests/integration-tests/tests/integration/catalog_tests.rs(+34 -21)📝
tests/integration-tests/tests/integration/client_future_tests.rs(+6 -9)📝
tests/integration-tests/tests/integration/client_tests.rs(+3 -6)📝
tests/integration-tests/tests/integration/dnssec_client_handle_tests.rs(+2 -2)📝
tests/integration-tests/tests/integration/invalid_nsec3_tests.rs(+8 -4)📝
tests/integration-tests/tests/integration/invalid_nsec_tests.rs(+8 -4)📝
tests/integration-tests/tests/integration/lookup_tests.rs(+8 -6)...and 5 more files
📄 Description
This PR splits the authoritative zone authorities into two parts, a common
AuthoritativeAuthorityand an implementation of the newStoreBackendtrait. This is part of #3169.I had to make some small changes to the code as I moved it around, in order to reflect the new split between structs. I also had to replace an
SqliteAuthority::update_records()call with anStoreBackendExt::upsert()during SQLite setup, because it crossed an abstraction boundary the wrong way, but I think the behavior is the same in this context. Note that some test expectations for response codes related toAxfrPolicy::Denychanged, because differing AXFR logic was unified.While this will unblock a variety of other improvements, I want to get this big refactor landed separately. The trait as it is does not meaningfully encapsulate either the SQLite database or the in-memory data structure, but both can be improved in the future now that we have the beginning of an API boundary. Naming could use some work, as well as the internal arrangement of modules, but those will be easy to change separately.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.