A cluster peer that missed a change catches up at its next successful heartbeat #334

Closed
opened 2026-11-05 20:48:51 -05:00 by claude · 1 comment
Owner

Part of epic #59.

  • Kind: feature
  • Area: dns
  • Priority: medium
  • Milestone: Post-release fixes
  • Agent: coder
  • Depends on: #333
  • Decisions: Q-CL-3 (#260)

Why

A failed live delivery, or one skipped for an unreachable peer, is only logged today. The README tells operators to save every page again by hand.

What changes

The broadcaster records a backfill request for each Unreachable peer it skips and each peer whose delivery fails, never for a Joining peer. See the work package detail below (59-5.

Acceptance

  • The four BroadcastAsync_* tests pass in src/dotnet/tests/Ninlil.Dns.Server.Cluster.Tests, and Backfill_AfterAPeerMissedAChange_DeliversItAtTheNextSuccessfulProbe passes in src/dotnet/tests/Ninlil.Web.Tests.
  • Every item in Before you finish that applies is done.

Source

ClusterConfigSyncBroadcaster.cs:21-27,69-140, README :4190-4194.

Work package detail

  • Goal (OD-3 = c): a peer that missed a live change catches up at its next successful probe.

  • Files:

    • ClusterConfigSyncBroadcaster.BroadcastAsync: for each Unreachable peer it skips, and each peer whose delivery fails, upsert a backfill request (set RequestedAtUtc = now when the row exists). Joining peers get none, with a comment saying why (the joiner's view of its inviter before the first heartbeat; avoids pushing the joiner's own accounts, OD-1).
    • A shared helper Backfill/ClusterConfigBackfillRequests.RequestAsync(repository, unitOfWork, clusterNodeId, now).
    • Rewrite the summary :21-27.
  • Acceptance (src/dotnet/tests/Ninlil.Dns.Server.Cluster.Tests):

    • BroadcastAsync_ForAnUnreachablePeer_RecordsABackfillRequest
    • BroadcastAsync_WhenADeliveryFails_RecordsABackfillRequestForThatPeer
    • BroadcastAsync_ForAJoiningPeer_RecordsNoRequest
    • BroadcastAsync_WhenEveryDeliverySucceeds_RecordsNoRequest

    In src/dotnet/tests/Ninlil.Web.Tests: Backfill_AfterAPeerMissedAChange_DeliversItAtTheNextSuccessfulProbe.

  • Gate:

    • dotnet test src/dotnet/tests/Ninlil.Dns.Server.Cluster.Tests
    • dotnet test src/dotnet/tests/Ninlil.Web.Tests
Part of epic #59. - **Kind:** feature - **Area:** dns - **Priority:** medium - **Milestone:** Post-release fixes - **Agent:** coder - **Depends on:** #333 - **Decisions:** Q-CL-3 (#260) ### Why A failed live delivery, or one skipped for an unreachable peer, is only logged today. The README tells operators to save every page again by hand. ### What changes The broadcaster records a backfill request for each `Unreachable` peer it skips and each peer whose delivery fails, never for a `Joining` peer. See the work package detail below (59-5. ### Acceptance - [ ] The four `BroadcastAsync_*` tests pass in `src/dotnet/tests/Ninlil.Dns.Server.Cluster.Tests`, and `Backfill_AfterAPeerMissedAChange_DeliversItAtTheNextSuccessfulProbe` passes in `src/dotnet/tests/Ninlil.Web.Tests`. - [ ] Every item in [Before you finish](https://git.lantea.one/lantea-one/ninlil/src/branch/main/AGENTS.md#before-you-finish) that applies is done. ### Source `ClusterConfigSyncBroadcaster.cs:21-27,69-140`, README `:4190-4194`. ### Work package detail - **Goal (OD-3 = c):** a peer that missed a live change catches up at its next successful probe. - **Files:** - `ClusterConfigSyncBroadcaster.BroadcastAsync`: for each `Unreachable` peer it skips, and each peer whose delivery fails, upsert a backfill request (set `RequestedAtUtc = now` when the row exists). `Joining` peers get none, with a comment saying why (the joiner's view of its inviter before the first heartbeat; avoids pushing the joiner's own accounts, OD-1). - A shared helper `Backfill/ClusterConfigBackfillRequests.RequestAsync(repository, unitOfWork, clusterNodeId, now)`. - Rewrite the summary `:21-27`. - **Acceptance (`src/dotnet/tests/Ninlil.Dns.Server.Cluster.Tests`):** - `BroadcastAsync_ForAnUnreachablePeer_RecordsABackfillRequest` - `BroadcastAsync_WhenADeliveryFails_RecordsABackfillRequestForThatPeer` - `BroadcastAsync_ForAJoiningPeer_RecordsNoRequest` - `BroadcastAsync_WhenEveryDeliverySucceeds_RecordsNoRequest` In `src/dotnet/tests/Ninlil.Web.Tests`: `Backfill_AfterAPeerMissedAChange_DeliversItAtTheNextSuccessfulProbe`. - **Gate:** - `dotnet test src/dotnet/tests/Ninlil.Dns.Server.Cluster.Tests` - `dotnet test src/dotnet/tests/Ninlil.Web.Tests`
Author
Owner

Done on feature/59-cluster-join-backfill (48dd773f); final verification runs over the whole epic before the PR. Closes when the epic merges into develop.

Done on `feature/59-cluster-join-backfill` (48dd773f); final verification runs over the whole epic before the PR. Closes when the epic merges into develop.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#334
No description provided.