Zones store aging settings and records store when a dynamic update last refreshed them #83
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#83
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
Records have no timestamp (
RecordEntity.cs:19-79), so stale dynamic records are never removed. MS-DNSP defines the aging model: a per-zone no-refresh interval and refresh interval, and a per-record timestamp in which zero means static.What changes
ZoneEntitygainsAgingEnabled(default false),AgingNoRefreshInterval(default 7 days) andAgingRefreshInterval(default 7 days). Existing zones get the same defaults, so nothing is scavenged until an operator turns aging on.RecordEntitygainsDynamicRefreshedUtc(DateTimeOffset?, null = static, never scavenged). Store it as the repository stores other times (see*ConvertDhcpLeaseTimesToTicks.cs).IRecordRepository.ListScavengeableAsync(zoneId, olderThanUtc, max)as a database-side query, with an index on (ZoneId, DynamicRefreshedUtc).AddRecordAging), MongoDB repository and index, a schema step if needed.Acceptance
AgingEnabled = falsewith 7-day intervals;ListScavengeableAsyncreturns only non-null rows older than the cut-off, capped atmax.src/dotnet/tests/Ninlil.Dns.Data.Integration.Testspasses.Source