By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Logic in #96 wasnt the best we should really store records in a single map that means we dont store A/AAAA records in two maps, this will simplify the lookup logic and return an exists boolean.
Replace four maps (aRecords, aaaaRecords, aWildcards, aaaaWildcards) with a single exact map and wildcards map
Store one recordSet (A + AAAA) per domain/pattern instead of separate A and AAAA maps
Exact lookups O(1); PTR unchanged (map); API updated to return exists boolean
How to test?
WIP untested in production, go tests are passing.
🔄 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/fosrl/olm/pull/97
**Author:** [@LaurenceJJones](https://github.com/LaurenceJJones)
**Created:** 2/26/2026
**Status:** ✅ Merged
**Merged:** 3/7/2026
**Merged by:** [@oschwartz10612](https://github.com/oschwartz10612)
**Base:** `dev` ← **Head:** `refactor/dns-record-store-trie`
---
### 📝 Commits (3)
- [`041a8f8`](https://github.com/fosrl/olm/commit/041a8f8be18b586b271954682d1823ca5b4a50ed) refactor(dns): trie + unified record set for DNSRecordStore
- [`c8a53e0`](https://github.com/fosrl/olm/commit/c8a53e0a9a23050873627243f10ef59cc3b4141d) refactor(dns): simplify DNSRecordStore from trie to map
- [`61e0f15`](https://github.com/fosrl/olm/commit/61e0f158026c03688492789e394dfe8bcbc493e7) test(dns): add dns test cases for nodata
### 📊 Changes
**4 files changed** (+355 additions, -188 deletions)
<details>
<summary>View changed files</summary>
📝 `dns/dns_proxy.go` (+8 -6)
➕ `dns/dns_proxy_test.go` (+178 -0)
📝 `dns/dns_records.go` (+127 -164)
📝 `dns/dns_records_test.go` (+42 -18)
</details>
### 📄 Description
## Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
## Description
fix: [github.com/orgs/fosrl/discussions/2533](https://github.com/orgs/fosrl/discussions/2533)
Logic in #96 wasnt the best we should really store records in a single map that means we dont store A/AAAA records in two maps, this will simplify the lookup logic and return an exists boolean.
- Replace four maps (aRecords, aaaaRecords, aWildcards, aaaaWildcards) with a single exact map and wildcards map
- Store one recordSet (A + AAAA) per domain/pattern instead of separate A and AAAA maps
- Exact lookups O(1); PTR unchanged (map); API updated to return exists boolean
## How to test?
WIP untested in production, go tests are passing.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/olm/pull/97
Author: @LaurenceJJones
Created: 2/26/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @oschwartz10612
Base:
dev← Head:refactor/dns-record-store-trie📝 Commits (3)
041a8f8refactor(dns): trie + unified record set for DNSRecordStorec8a53e0refactor(dns): simplify DNSRecordStore from trie to map61e0f15test(dns): add dns test cases for nodata📊 Changes
4 files changed (+355 additions, -188 deletions)
View changed files
📝
dns/dns_proxy.go(+8 -6)➕
dns/dns_proxy_test.go(+178 -0)📝
dns/dns_records.go(+127 -164)📝
dns/dns_records_test.go(+42 -18)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
fix: github.com/orgs/fosrl/discussions/2533
Logic in #96 wasnt the best we should really store records in a single map that means we dont store A/AAAA records in two maps, this will simplify the lookup logic and return an exists boolean.
How to test?
WIP untested in production, go tests are passing.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.