A change saved on one instance expires the matching caches on every instance that shares the ValKey server #71
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.
Blocks
Depends on
Reference
lantea-one/ninlil#71
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Why
EntityChangeNotifiercalls only in-process subscribers (src/dotnet/src/Ninlil.Dns.Data.Abstractions/Repository/EntityChangeNotifier.cs:29-69). Today's subscribers:DnsRewriteCache.cs:81DnsClientScheduleCache.cs:93ForwarderSetCache.cs:87DnsClientDirectory.cs:83DnsFilterConfigurationCache.cs:150,160The zone cache reloads only on the local
DnsZoneChangedEvent(src/dotnet/src/Ninlil.Dns.Server.Authoritative/Cache/ZoneChangedEventSubscriber.cs:12-19). The access-rule cache works the same way (src/dotnet/src/Ninlil.Dns.Server.AccessControl/DnsAccessControlRuleCache.cs:17-22). An instance ignores broker events it did not make (README.md:4199-4204). #50 gives the zone, signed-zone and access-rule caches a 60 s time-to-live first, so every cache then has a bounded delay without ValKey; this issue brings every cache down to about a second when ValKey is configured.What changes
ValkeyEntityChangeRelayhosted service:<prefix>:changes.{ v: 1, origin: <DnsServerEventPublisher.InstanceId>, types: [full type names], zoneIds: [...] }.InstanceIdis atsrc/dotnet/src/Ninlil.Dns.Server.Core/Events/DnsServerEventPublisher.cs:90; it is per process, which is what echo suppression needs.IEntityChangeNotifier.cs:36-40).NotifyChangedon a path that is not published again. Suggested shape: an internalNotifyChangedFromRemoteonEntityChangeNotifier, or a flag carried through.DnsZoneChangedEventand publishes the zone id. A receiver callsAuthoritativeZoneCache.ReloadZoneAsync(andSignedZoneCache.ReloadZoneAsync, the pair #50's backstop uses).DnsAccessControlRuleEntityreloadsDnsAccessControlRuleCache.DnsFilterListEntryEntitysignal goes through the existing "expire all entry caches" path (DnsFilterConfigurationCache.cs:160).src/dotnet/src/Ninlil.Common.Valkey/(relay)src/dotnet/src/Ninlil.Dns.Data.Abstractions/Repository/EntityChangeNotifier.cssrc/dotnet/src/Ninlil.Dns.Server.Authoritative/Cache/src/dotnet/src/Ninlil.Dns.Server.AccessControl/Program.csAcceptance
NinlilDnsWebApplicationFactoryhosts on one SQLite file plus one ValKey container. Add a rewrite through host A's API; host B answers the rewritten name within 2 s (RequiresDocker; usefactory.CreateSecondHost).dotnet test src/dotnet/tests/Ninlil.Common.Valkey.Testspasses.src/dotnet/tests/Ninlil.Dns.Server.Authoritative.Testsandsrc/dotnet/tests/Ninlil.Web.Testspass.Source
b11-12-design.md§2.8 and §2.9.Ghost referenced this issue2026-11-05 01:32:43 -05:00