[PR #3020] [MERGED] resolver: clean up name server pool implementation #3496

Closed
opened 2026-03-16 11:46:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3020
Author: @djc
Created: 5/29/2025
Status: Merged
Merged: 6/2/2025
Merged by: @djc

Base: mainHead: pool-state


📝 Commits (10+)

  • 2287163 resolver: remove unused impls
  • c936b82 proto: move NameServerStateInner below NameServerState
  • 14e2687 resolver: rename NameServerStateInner to ConnectionState
  • 62464f8 resolver: remove unused parameter
  • 5f8c66b resolver: implement Default for NameServerState
  • 04075a5 resolver: import Ordering directly
  • 1f4e9f8 resolver: merge name_server_state module into name_server
  • 4c91cd1 resolver: inline ConnectionProvider bounds
  • d2474a7 resolver: drop bounds that are imposed by the trait definition
  • eb755df resolver: re-order items in name_server_stats

📊 Changes

9 files changed (+608 additions, -787 deletions)

View changed files

📝 crates/recursor/src/recursor_dns_handle.rs (+3 -2)
📝 crates/resolver/src/lookup.rs (+1 -1)
📝 crates/resolver/src/name_server/mod.rs (+7 -10)
📝 crates/resolver/src/name_server/name_server.rs (+500 -107)
📝 crates/resolver/src/name_server/name_server_pool.rs (+89 -125)
crates/resolver/src/name_server/name_server_state.rs (+0 -172)
crates/resolver/src/name_server/name_server_stats.rs (+0 -359)
📝 crates/resolver/src/resolver.rs (+6 -9)
📝 tests/integration-tests/tests/integration/name_server_pool_tests.rs (+2 -2)

📄 Description

While I did a lot of small refactoring along the way, the big goal here is to get rid of the separate datagram_conns and stream_conns in the NameServerPool in favor of a single list of servers. In combination with #3019, that will enable further improvements in the configuration and implementation of the resolver's name server pool.

This is eventually in service of #2738.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/3020 **Author:** [@djc](https://github.com/djc) **Created:** 5/29/2025 **Status:** ✅ Merged **Merged:** 6/2/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `pool-state` --- ### 📝 Commits (10+) - [`2287163`](https://github.com/hickory-dns/hickory-dns/commit/22871639192299bdc6f0d280b856b6e0533fe702) resolver: remove unused impls - [`c936b82`](https://github.com/hickory-dns/hickory-dns/commit/c936b82b25a3d78a789ee8b7d6dd78207199d2b6) proto: move NameServerStateInner below NameServerState - [`14e2687`](https://github.com/hickory-dns/hickory-dns/commit/14e268710cd6ca94e6abb3a6050aa2cac44b8854) resolver: rename NameServerStateInner to ConnectionState - [`62464f8`](https://github.com/hickory-dns/hickory-dns/commit/62464f8b3251a47b7149905a931c590f1c4e7d3a) resolver: remove unused parameter - [`5f8c66b`](https://github.com/hickory-dns/hickory-dns/commit/5f8c66baa2bfe5864b6d09e6ab696e5dcc04068a) resolver: implement Default for NameServerState - [`04075a5`](https://github.com/hickory-dns/hickory-dns/commit/04075a5996ebdbf7179017d035cec1e3863fa269) resolver: import Ordering directly - [`1f4e9f8`](https://github.com/hickory-dns/hickory-dns/commit/1f4e9f88042251ad2dc33c2d234f5f54f7cc9695) resolver: merge name_server_state module into name_server - [`4c91cd1`](https://github.com/hickory-dns/hickory-dns/commit/4c91cd1e38a3a71f02a3a1e1565c6cd2a88ab5c1) resolver: inline ConnectionProvider bounds - [`d2474a7`](https://github.com/hickory-dns/hickory-dns/commit/d2474a77a3e20ab48121c86bf2caea573531258d) resolver: drop bounds that are imposed by the trait definition - [`eb755df`](https://github.com/hickory-dns/hickory-dns/commit/eb755df955efd7347ff3d52e039434c80cac2553) resolver: re-order items in name_server_stats ### 📊 Changes **9 files changed** (+608 additions, -787 deletions) <details> <summary>View changed files</summary> 📝 `crates/recursor/src/recursor_dns_handle.rs` (+3 -2) 📝 `crates/resolver/src/lookup.rs` (+1 -1) 📝 `crates/resolver/src/name_server/mod.rs` (+7 -10) 📝 `crates/resolver/src/name_server/name_server.rs` (+500 -107) 📝 `crates/resolver/src/name_server/name_server_pool.rs` (+89 -125) ➖ `crates/resolver/src/name_server/name_server_state.rs` (+0 -172) ➖ `crates/resolver/src/name_server/name_server_stats.rs` (+0 -359) 📝 `crates/resolver/src/resolver.rs` (+6 -9) 📝 `tests/integration-tests/tests/integration/name_server_pool_tests.rs` (+2 -2) </details> ### 📄 Description While I did a lot of small refactoring along the way, the big goal here is to get rid of the separate `datagram_conns` and `stream_conns` in the `NameServerPool` in favor of a single list of servers. In combination with #3019, that will enable further improvements in the configuration and implementation of the resolver's name server pool. This is eventually in service of #2738. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:46:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3496
No description provided.