Cluster peers can be marked as owed a config backfill, and synced tables can be listed by id #330
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
Reference
lantea-one/ninlil#330
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?
Part of epic #59.
Why
A join backfill must survive a restart and must not be undone by the heartbeat, which rewrites every peer row each round. It also needs an id snapshot that does not skip rows when rows are deleted during the pass.
What changes
New
ClusterPeerConfigBackfillEntityand its repository (EF and MongoDB),IRepository.ListIdsAsync, migrationAddClusterPeerConfigBackfillfor each of the four relational providers, the MongoDB index, removal on peer delete, and exclusion from backups. See the work package detail below (59-1).Acceptance
dotnet test src/dotnet/tests/Ninlil.Dns.Data.Integration.Testspasses the newListIdsAsync_*,ClusterPeerConfigBackfill_*andRemovingAClusterNode_RemovesItsBackfillRequesttests on every engine.Delete_OfAPeerWithAPendingBackfill_RemovesTheRequestpasses insrc/dotnet/tests/Ninlil.Web.Tests. The Backup catalogue test passes.dotnet test Ninlil.slnx -p:NinlilSkipAngularBuild=truepasses.Source
ClusterHeartbeatBackgroundService.cs:132-135,ClusterController.cs:153-155,ClusterSyncTombstoneEntity.cs:13-19, the #59 design §1.1, §2.Work package detail
Goal: persist owed backfills and give every synced repository an id-only snapshot read.
Files:
Ninlil.Dns.Data.Abstractions/Entity/ClusterPeerConfigBackfillEntity.cs(new,EntityBase):Guid ClusterNodeId,DateTimeOffset RequestedAtUtc,int AttemptCount,DateTimeOffset? LastAttemptAtUtc,string LastError(max 1000).Repository/IClusterPeerConfigBackfillRepository.cs(new):FindByClusterNodeIdAsync(Guid, ct),ListPendingClusterNodeIdsAsync(ct).IRepository<TEntity>: addTask<IReadOnlyList<Guid>> ListIdsAsync(Expression<Func<TEntity,bool>> predicate = null, CancellationToken stoppingToken = default), implemented in the EF and MongoDB base repositories as a projection, never by loading entities.IClusterSyncTombstoneRepository: inheritsListIdsAsync; nothing else is needed.Configuration/ClusterPeerConfigBackfillConfiguration.cs(unique index onClusterNodeId, FK toClusterNodewith cascade delete),NinlilDnsContext, the repository, and its DI registration.AddClusterPeerConfigBackfill× Sqlite, PostgreSql, MySql, SqlServer, then the namespace script.MongoIndexCatalog, and DI registration. NoMongoSchemaStepsentry: a new collection is not misread by an older build. Removing a peer must also remove its request; add that call toClusterController.Delete(ClusterController.cs:153-155, same unit of work), because MongoDB has no cascade.Ninlil.Dns.Server.Backup/Catalog/BackupEntityCatalog.cs: leave the new entity out of backups, like tombstones (sync bookkeeping).Constraints: follow
ClusterNodeConfigurationforDateTimeOffsetcolumns. Do not hand-edit generated migrations.Acceptance (fail first): in
src/dotnet/tests/Ninlil.Dns.Data.Integration.Tests(every engine; the container classes carryRequiresDocker):ListIdsAsync_WithAPredicate_ReturnsOnlyTheMatchingIdsListIdsAsync_OnAnEmptyTable_ReturnsNoIdsClusterPeerConfigBackfill_SecondRowForTheSameNode_IsRejectedListPendingClusterNodeIdsAsync_ReturnsEveryRequestedPeerRemovingAClusterNode_RemovesItsBackfillRequest(relational, cascade)In
src/dotnet/tests/Ninlil.Web.Tests:Delete_OfAPeerWithAPendingBackfill_RemovesTheRequest. Insrc/dotnet/tests/Ninlil.Dns.Server.Backup.Tests: the catalogue completeness test fails until the entity is classified.Non-goals: any runner logic.
Gate:
dotnet test src/dotnet/tests/Ninlil.Dns.Data.Integration.Testsdotnet test src/dotnet/tests/Ninlil.Dns.Data.Testsdotnet test src/dotnet/tests/Ninlil.Dns.Server.Backup.Testsdotnet test src/dotnet/tests/Ninlil.Web.TestsIRepositoryis a shared abstraction, so alsodotnet test Ninlil.slnx -p:NinlilSkipAngularBuild=true.Ghost referenced this issue2026-11-05 20:48:52 -05:00
Ghost referenced this issue2026-11-05 20:49:02 -05:00
Ghost referenced this issue2026-11-05 21:32:01 -05:00
Done on
feature/59-cluster-join-backfill(ebb5888e,2e416050,4624e56d,7ab82ff5); verified (full solution green incl. Docker integration on all engines). Closes when the epic branch merges into develop.Ghost referenced this issue2026-11-06 01:41:02 -05:00
Ghost referenced this issue2026-11-06 01:42:00 -05:00