[PR #1550] [MERGED] Move to async-trait for server to simplify function calls #2407

Closed
opened 2026-03-16 08:52:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1550
Author: @bluejekyll
Created: 9/5/2021
Status: Merged
Merged: 9/20/2021
Merged by: @bluejekyll

Base: mainHead: use-async-trait-in-server


📝 Commits (2)

  • e69b903 Move to async-trait for server to simplify function calls
  • 0c0e2ae require Authority to have interior mutability

📊 Changes

33 files changed (+1497 additions, -1250 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 Cargo.lock (+1 -2)
📝 bin/src/named.rs (+46 -41)
📝 crates/async-std-resolver/Cargo.toml (+1 -1)
📝 crates/proto/Cargo.toml (+1 -1)
📝 crates/server/Cargo.toml (+5 -0)
📝 crates/server/src/authority/authority.rs (+28 -29)
📝 crates/server/src/authority/authority_object.rs (+61 -77)
📝 crates/server/src/authority/catalog.rs (+45 -51)
📝 crates/server/src/authority/mod.rs (+1 -1)
📝 crates/server/src/server/https_handler.rs (+10 -11)
📝 crates/server/src/server/request_handler.rs (+5 -13)
📝 crates/server/src/server/response_handler.rs (+5 -3)
📝 crates/server/src/server/server_future.rs (+16 -42)
📝 crates/server/src/store/file/authority.rs (+46 -49)
📝 crates/server/src/store/forwarder/authority.rs (+28 -50)
📝 crates/server/src/store/in_memory/authority.rs (+313 -150)
📝 crates/server/src/store/sqlite/authority.rs (+205 -164)
📝 crates/server/tests/authority_battery/basic.rs (+1 -1)
📝 crates/server/tests/authority_battery/dnssec.rs (+4 -8)

...and 13 more files

📄 Description

While working on #1525 I realized that would be a lot simpler if the function calls in the server were simplified as async fns rather than the old Future state-machines.

There are a few additional changes on the way for this, but the initial change looks good (and fixes some things in some of the implementations).


🔄 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/1550 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 9/5/2021 **Status:** ✅ Merged **Merged:** 9/20/2021 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `use-async-trait-in-server` --- ### 📝 Commits (2) - [`e69b903`](https://github.com/hickory-dns/hickory-dns/commit/e69b903227378f2e4e3cfb65760f32e07b2ee65a) Move to async-trait for server to simplify function calls - [`0c0e2ae`](https://github.com/hickory-dns/hickory-dns/commit/0c0e2ae28b61485b324f265faca15f1a1f20bb96) require Authority to have interior mutability ### 📊 Changes **33 files changed** (+1497 additions, -1250 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `Cargo.lock` (+1 -2) 📝 `bin/src/named.rs` (+46 -41) 📝 `crates/async-std-resolver/Cargo.toml` (+1 -1) 📝 `crates/proto/Cargo.toml` (+1 -1) 📝 `crates/server/Cargo.toml` (+5 -0) 📝 `crates/server/src/authority/authority.rs` (+28 -29) 📝 `crates/server/src/authority/authority_object.rs` (+61 -77) 📝 `crates/server/src/authority/catalog.rs` (+45 -51) 📝 `crates/server/src/authority/mod.rs` (+1 -1) 📝 `crates/server/src/server/https_handler.rs` (+10 -11) 📝 `crates/server/src/server/request_handler.rs` (+5 -13) 📝 `crates/server/src/server/response_handler.rs` (+5 -3) 📝 `crates/server/src/server/server_future.rs` (+16 -42) 📝 `crates/server/src/store/file/authority.rs` (+46 -49) 📝 `crates/server/src/store/forwarder/authority.rs` (+28 -50) 📝 `crates/server/src/store/in_memory/authority.rs` (+313 -150) 📝 `crates/server/src/store/sqlite/authority.rs` (+205 -164) 📝 `crates/server/tests/authority_battery/basic.rs` (+1 -1) 📝 `crates/server/tests/authority_battery/dnssec.rs` (+4 -8) _...and 13 more files_ </details> ### 📄 Description While working on #1525 I realized that would be a lot simpler if the function calls in the server were simplified as `async fn`s rather than the old `Future` state-machines. There are a few additional changes on the way for this, but the initial change looks good (and fixes some things in some of the implementations). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:52:12 +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#2407
No description provided.