Instances that share one database see each other’s zone and access-rule changes within 60 seconds #276
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!276
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/50-cache-ttl-backstop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Instances that share one database now see each other's zone and access-rule changes within 60 seconds, without a restart (owner decision Q-INT-5). Each cache's TTL is the backstop #71 will keep alongside ValKey.
ZoneCacheBackstopServiceruns every 60 s on the injectedTimeProvider. It reads the stored zones and records (from a replica when configured) and compares them with the cached zones by zone fields and by record id and content. Only zones that were added, changed or removed are reloaded, throughAuthoritativeZoneCache.ReloadZoneAsyncandSignedZoneCache.ReloadZoneAsync, from the primary. An unchanged signed zone is never signed again.CachedZone.StoredRecordskeeps the rows #28 leaves out, so a permanently unwritable row is not seen as a change on every pass.DnsAccessControlRuleBackstopServicereloads the whole rule set every 60 s from the primary. The table is small, and a replica read on a timer could undo a fresh local change.DnsZoneChangedEvent, and starts no NOTIFY, PTR sync or webhooks; a test proves it.Benchmark (one pass that finds no change, Large: 1,000 zones plus one of 50,000 records;
--job short):Verified: 7 new tests (5 fail on assertions against a no-op pass; the zone tests passed 5 runs in a row). Authoritative 655, AccessControl 10, Dnssec 122 and Web 2038 tests pass; build 0 warnings.
Known and accepted: a backstop reload and a simultaneous local event reload can briefly store the older read. The next pass heals it, and the same race already exists between two event reloads. Detection loads full record rows; a lighter projection could cut the allocation.
Closes #50
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK