[PR #3299] [CLOSED] Refactor InMemoryZoneHandler into reusable pieces #3723

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3299
Author: @divergentdave
Created: 10/3/2025
Status: Closed

Base: mainHead: david/in-memory-inner-refactor


📝 Commits (2)

  • 66b96d5 Add StoreBackend trait, implement on InnerInMemory
  • 2e4d373 Move InnerInMemory::upsert() to StoreBackendExt

📊 Changes

3 files changed (+130 additions, -4 deletions)

View changed files

📝 crates/server/src/store/in_memory/inner.rs (+51 -4)
📝 crates/server/src/store/in_memory/mod.rs (+1 -0)
📝 crates/server/src/store/mod.rs (+78 -0)

📄 Description

This PR is an incremental approach to the first couple commits from #3228. It introduces the StoreBackend trait and implements it on InnerInMemory. The next steps are to move methods from InnerInMemory to the extension trait StoreBackendExt, so that they can be reused with zones stored in a file or a database, then turn InMemoryZoneHandler into a generic authoritative zone handler. Lastly, items can be renamed, and modules can be rearranged. So far I have moved just one method into StoreBackendExt, while keeping it in place textually. I'm posting this as a draft for early feedback on the approach.

Part of #3169.


🔄 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/3299 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 10/3/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `david/in-memory-inner-refactor` --- ### 📝 Commits (2) - [`66b96d5`](https://github.com/hickory-dns/hickory-dns/commit/66b96d512975a530817b1aae6e4c40f6fe24fd9e) Add StoreBackend trait, implement on InnerInMemory - [`2e4d373`](https://github.com/hickory-dns/hickory-dns/commit/2e4d373df8a87c6a58f5f8a8eeb5d9f62faf6d7f) Move InnerInMemory::upsert() to StoreBackendExt ### 📊 Changes **3 files changed** (+130 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/server/src/store/in_memory/inner.rs` (+51 -4) 📝 `crates/server/src/store/in_memory/mod.rs` (+1 -0) 📝 `crates/server/src/store/mod.rs` (+78 -0) </details> ### 📄 Description This PR is an incremental approach to the first couple commits from #3228. It introduces the `StoreBackend` trait and implements it on `InnerInMemory`. The next steps are to move methods from `InnerInMemory` to the extension trait `StoreBackendExt`, so that they can be reused with zones stored in a file or a database, then turn `InMemoryZoneHandler` into a generic authoritative zone handler. Lastly, items can be renamed, and modules can be rearranged. So far I have moved just one method into `StoreBackendExt`, while keeping it in place textually. I'm posting this as a draft for early feedback on the approach. Part of #3169. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:59:08 +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#3723
No description provided.