[PR #1478] [MERGED] Use Stream instead of Future for resolver #2359

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1478
Author: @trinity-1686a
Created: 5/4/2021
Status: Merged
Merged: 5/22/2021
Merged by: @bluejekyll

Base: mainHead: feature/stream-response


📝 Commits (10+)

  • 7624761 replace futures of dns responses with stream in proto
  • 9e33886 replace futures of dns responses with stream in https and client
  • d2b8b93 implement usage of future in resolver and integration test
  • 286d046 add support for stream using mpsc for tcp multiplexer
  • 9efeeaf add zone_transfert helper to client
  • 88311b9 minor changes
  • 1a2242d update documentation to reflect usage of streams
  • 246f592 add documentation for zone_transfert()
  • 466495a remove multi_answer flag
  • a712fb4 fix minimum version and import on wrong feature flag

📊 Changes

35 files changed (+3464 additions, -406 deletions)

View changed files

📝 Makefile.toml (+2 -1)
📝 crates/client/Cargo.toml (+2 -1)
📝 crates/client/src/client/async_client.rs (+504 -5)
📝 crates/client/src/client/async_secure_client.rs (+2 -2)
📝 crates/client/src/client/client.rs (+52 -8)
📝 crates/client/src/client/memoize_client_handle.rs (+30 -21)
📝 crates/client/src/client/mod.rs (+3 -3)
crates/client/src/client/rc_future.rs (+0 -114)
crates/client/src/client/rc_stream.rs (+122 -0)
📝 crates/client/src/op/update_message.rs (+46 -1)
📝 crates/proto/Cargo.toml (+1 -1)
📝 crates/proto/src/https/https_client_stream.rs (+7 -6)
📝 crates/proto/src/rr/record_type.rs (+1 -0)
📝 crates/proto/src/tests/udp.rs (+3 -2)
📝 crates/proto/src/udp/udp_client_stream.rs (+2 -2)
📝 crates/proto/src/xfer/dns_exchange.rs (+8 -8)
📝 crates/proto/src/xfer/dns_handle.rs (+3 -3)
📝 crates/proto/src/xfer/dns_multiplexer.rs (+278 -12)
📝 crates/proto/src/xfer/dns_response.rs (+29 -24)
📝 crates/proto/src/xfer/dnssec_dns_handle.rs (+56 -55)

...and 15 more files

📄 Description

replace #1466, and maybe #1337
Use Streams instead of Futures for most of resolver (still use Future for certain user-facing functions that should always return a single response)
Also add a zone_transfer() on Client to make zone transfer easier.

Most types/variables names and documentation should have been updated to match with if it's a stream or a future

Some tests should be added, like an IXFR query against Bind using zone_transfer(), and a multi-message zone transfer.

PS: I'm sorry if I bother you with multiple large PRs, do tell if I'm getting annoying.


🔄 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/1478 **Author:** [@trinity-1686a](https://github.com/trinity-1686a) **Created:** 5/4/2021 **Status:** ✅ Merged **Merged:** 5/22/2021 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `feature/stream-response` --- ### 📝 Commits (10+) - [`7624761`](https://github.com/hickory-dns/hickory-dns/commit/7624761ccee19b4cef66e1a9dd488165b74efe22) replace futures of dns responses with stream in proto - [`9e33886`](https://github.com/hickory-dns/hickory-dns/commit/9e338866dfc51e1cd935a2650c30d3927006aa36) replace futures of dns responses with stream in https and client - [`d2b8b93`](https://github.com/hickory-dns/hickory-dns/commit/d2b8b93f463b5e039cd4ea2d6a4a630e7809f518) implement usage of future in resolver and integration test - [`286d046`](https://github.com/hickory-dns/hickory-dns/commit/286d046e529eabe7fe9b578d71ee40a6efd649bc) add support for stream using mpsc for tcp multiplexer - [`9efeeaf`](https://github.com/hickory-dns/hickory-dns/commit/9efeeaf0a4531125d73c7d86a30023c10040549b) add zone_transfert helper to client - [`88311b9`](https://github.com/hickory-dns/hickory-dns/commit/88311b9e45fb7ec7b88dbff09ff55ede2d5e3dab) minor changes - [`1a2242d`](https://github.com/hickory-dns/hickory-dns/commit/1a2242d88d6cbb35ad22516e66456b94d43dbc07) update documentation to reflect usage of streams - [`246f592`](https://github.com/hickory-dns/hickory-dns/commit/246f592432732db9d154ff4bb4bade5b2dd01130) add documentation for zone_transfert() - [`466495a`](https://github.com/hickory-dns/hickory-dns/commit/466495a65714003ffe2616bef81bdcd66888ae0c) remove multi_answer flag - [`a712fb4`](https://github.com/hickory-dns/hickory-dns/commit/a712fb4b77f1e20a5cf5260731655c4acf41fff8) fix minimum version and import on wrong feature flag ### 📊 Changes **35 files changed** (+3464 additions, -406 deletions) <details> <summary>View changed files</summary> 📝 `Makefile.toml` (+2 -1) 📝 `crates/client/Cargo.toml` (+2 -1) 📝 `crates/client/src/client/async_client.rs` (+504 -5) 📝 `crates/client/src/client/async_secure_client.rs` (+2 -2) 📝 `crates/client/src/client/client.rs` (+52 -8) 📝 `crates/client/src/client/memoize_client_handle.rs` (+30 -21) 📝 `crates/client/src/client/mod.rs` (+3 -3) ➖ `crates/client/src/client/rc_future.rs` (+0 -114) ➕ `crates/client/src/client/rc_stream.rs` (+122 -0) 📝 `crates/client/src/op/update_message.rs` (+46 -1) 📝 `crates/proto/Cargo.toml` (+1 -1) 📝 `crates/proto/src/https/https_client_stream.rs` (+7 -6) 📝 `crates/proto/src/rr/record_type.rs` (+1 -0) 📝 `crates/proto/src/tests/udp.rs` (+3 -2) 📝 `crates/proto/src/udp/udp_client_stream.rs` (+2 -2) 📝 `crates/proto/src/xfer/dns_exchange.rs` (+8 -8) 📝 `crates/proto/src/xfer/dns_handle.rs` (+3 -3) 📝 `crates/proto/src/xfer/dns_multiplexer.rs` (+278 -12) 📝 `crates/proto/src/xfer/dns_response.rs` (+29 -24) 📝 `crates/proto/src/xfer/dnssec_dns_handle.rs` (+56 -55) _...and 15 more files_ </details> ### 📄 Description replace #1466, and maybe #1337 Use Streams instead of Futures for most of resolver (still use Future for certain user-facing functions that should always return a single response) Also add a `zone_transfer()` on Client to make zone transfer easier. Most types/variables names and documentation should have been updated to match with if it's a stream or a future Some tests should be added, like an IXFR query against Bind using `zone_transfer()`, and a multi-message zone transfer. PS: I'm sorry if I bother you with multiple large PRs, do tell if I'm getting annoying. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:49:29 +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#2359
No description provided.