[PR #497] [MERGED] improve truncation to always return records #1483

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/497
Author: @bluejekyll
Created: 5/28/2018
Status: Merged
Merged: 6/6/2018
Merged by: @bluejekyll

Base: masterHead: better-truncation


📝 Commits (6)

  • 3f9f827 improve truncation to always return records
  • b17ef45 refactor authority/catelog to return iterators
  • eb6ce11 cleanup LookupRecords construction
  • c4bcedc clean up docs
  • 1535204 add large recordset truncation test
  • e3130bc dedup message serialization

📊 Changes

26 files changed (+1590 additions, -1205 deletions)

View changed files

📝 client/src/rr/dnssec/signer.rs (+27 -34)
📝 integration-tests/src/lib.rs (+5 -4)
📝 integration-tests/tests/authority_tests.rs (+385 -447)
📝 integration-tests/tests/catalog_tests.rs (+10 -35)
📝 proto/src/error.rs (+8 -0)
📝 proto/src/op/header.rs (+2 -20)
📝 proto/src/op/message.rs (+152 -124)
📝 proto/src/op/mod.rs (+1 -1)
📝 proto/src/rr/dnssec/tbs.rs (+5 -5)
📝 proto/src/rr/dnssec/verifier.rs (+4 -4)
📝 proto/src/rr/mod.rs (+1 -0)
📝 proto/src/rr/resource.rs (+36 -24)
📝 proto/src/rr/rr_set.rs (+224 -77)
📝 proto/src/serialize/binary/encoder.rs (+88 -35)
📝 proto/src/xfer/dns_future.rs (+36 -18)
📝 proto/src/xfer/dns_request.rs (+5 -0)
📝 server/src/authority/auth_lookup.rs (+39 -32)
📝 server/src/authority/authority.rs (+268 -112)
📝 server/src/authority/catalog.rs (+29 -37)
📝 server/src/authority/message_request.rs (+32 -35)

...and 6 more files

📄 Description

This adds the ability to set rollback points during serialization of the Message. This was pulled out of the #492 change, but is narrower. I need to add some tests for this case. The goal is that if we can't return all records, at least the set that could be written to the buffer are sent.

This went beyond the original scope a little bit to prepare for #492, by switching out temporary vectors during lookups for custom Iterator combinators.

Fixes: #319


🔄 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/497 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 5/28/2018 **Status:** ✅ Merged **Merged:** 6/6/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `better-truncation` --- ### 📝 Commits (6) - [`3f9f827`](https://github.com/hickory-dns/hickory-dns/commit/3f9f827ad2837c6151edf712665bdde7f347a981) improve truncation to always return records - [`b17ef45`](https://github.com/hickory-dns/hickory-dns/commit/b17ef45dec80d6cc56e6a9218475df2f754f20b6) refactor authority/catelog to return iterators - [`eb6ce11`](https://github.com/hickory-dns/hickory-dns/commit/eb6ce1176b5e7f530953b25e785177686ca16ece) cleanup LookupRecords construction - [`c4bcedc`](https://github.com/hickory-dns/hickory-dns/commit/c4bcedc61c8529f0f7a9e13e9981b42ce28a1e82) clean up docs - [`1535204`](https://github.com/hickory-dns/hickory-dns/commit/15352044ab73cc18c32d85351c223e25181366df) add large recordset truncation test - [`e3130bc`](https://github.com/hickory-dns/hickory-dns/commit/e3130bc5b22ff21e9bcc963a65fb9698d9188880) dedup message serialization ### 📊 Changes **26 files changed** (+1590 additions, -1205 deletions) <details> <summary>View changed files</summary> 📝 `client/src/rr/dnssec/signer.rs` (+27 -34) 📝 `integration-tests/src/lib.rs` (+5 -4) 📝 `integration-tests/tests/authority_tests.rs` (+385 -447) 📝 `integration-tests/tests/catalog_tests.rs` (+10 -35) 📝 `proto/src/error.rs` (+8 -0) 📝 `proto/src/op/header.rs` (+2 -20) 📝 `proto/src/op/message.rs` (+152 -124) 📝 `proto/src/op/mod.rs` (+1 -1) 📝 `proto/src/rr/dnssec/tbs.rs` (+5 -5) 📝 `proto/src/rr/dnssec/verifier.rs` (+4 -4) 📝 `proto/src/rr/mod.rs` (+1 -0) 📝 `proto/src/rr/resource.rs` (+36 -24) 📝 `proto/src/rr/rr_set.rs` (+224 -77) 📝 `proto/src/serialize/binary/encoder.rs` (+88 -35) 📝 `proto/src/xfer/dns_future.rs` (+36 -18) 📝 `proto/src/xfer/dns_request.rs` (+5 -0) 📝 `server/src/authority/auth_lookup.rs` (+39 -32) 📝 `server/src/authority/authority.rs` (+268 -112) 📝 `server/src/authority/catalog.rs` (+29 -37) 📝 `server/src/authority/message_request.rs` (+32 -35) _...and 6 more files_ </details> ### 📄 Description This adds the ability to set rollback points during serialization of the Message. This was pulled out of the #492 change, but is narrower. I need to add some tests for this case. The goal is that if we can't return all records, at least the set that could be written to the buffer are sent. This went beyond the original scope a little bit to prepare for #492, by switching out temporary vectors during lookups for custom Iterator combinators. Fixes: #319 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:08:56 +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#1483
No description provided.