A cluster join names a renamed account or role after the node that created it, never with an all-zero node id #466

Merged
claude merged 4 commits from feature/450-cluster-conflict-rename-node-id into develop 2026-11-14 11:22:01 -05:00
Owner

Closes #450

When two cluster nodes hold a user or role with the same name, the one that loses is renamed to <name>-conflict-<node-id>. The id was taken from the other side of the collision and was all zeros for a row with no recorded origin (the bootstrap admin account and Administrators role), so a join produced admin-conflict-000…000, and two losers of one name could be given the same new name.

The id is now the id of the node that created the renamed row; a row with no recorded origin takes the id of the node that holds it. Every node computes the same name for a loser, each loser gets its own name, and a long name is shortened before the suffix so the suffix is never cut off. A name that an earlier join gave an all-zero id stays as it is.

Checked by a verifier. Three real appliers over three SQLite stores, each with its own bootstrap admin, exchanged all rows in all 6 timestamp orders and 8 receive orders (48 cases) plus two backfill rounds: all three nodes ended with the same row ids and names in every case; with the old rule most cases diverged or threw. A rename sends nothing back and does not change the winner elsewhere. Build: 0 warnings. Ninlil.Dns.Server.ClusterSync.Tests 75, Ninlil.Dns.Server.Cluster.Tests 76, the Docker backfill integration tests 54, Ninlil.Web.Tests apart from the two SpaFallbackTests that need a built console.

README (clustering), the wiki page pages/docs/guides/operations/clustering.md and the CHANGELOG describe the rule in the same words; the CHANGELOG names the constructor change for users of the Ninlil.Dns.Server.ClusterSync package.

Follow-ups filed as #465: an exact timestamp tie can settle differently on two nodes (older behaviour), and a second collision from the same creating node repeats a renamed name (that one envelope is skipped with an error log; the stream carries on).

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

Closes #450 When two cluster nodes hold a user or role with the same name, the one that loses is renamed to `<name>-conflict-<node-id>`. The id was taken from the other side of the collision and was all zeros for a row with no recorded origin (the bootstrap `admin` account and `Administrators` role), so a join produced `admin-conflict-000…000`, and two losers of one name could be given the same new name. The id is now the id of the node that created the renamed row; a row with no recorded origin takes the id of the node that holds it. Every node computes the same name for a loser, each loser gets its own name, and a long name is shortened before the suffix so the suffix is never cut off. A name that an earlier join gave an all-zero id stays as it is. **Checked by a verifier.** Three real appliers over three SQLite stores, each with its own bootstrap `admin`, exchanged all rows in all 6 timestamp orders and 8 receive orders (48 cases) plus two backfill rounds: all three nodes ended with the same row ids and names in every case; with the old rule most cases diverged or threw. A rename sends nothing back and does not change the winner elsewhere. Build: 0 warnings. `Ninlil.Dns.Server.ClusterSync.Tests` 75, `Ninlil.Dns.Server.Cluster.Tests` 76, the Docker backfill integration tests 54, `Ninlil.Web.Tests` apart from the two `SpaFallbackTests` that need a built console. README (clustering), the wiki page `pages/docs/guides/operations/clustering.md` and the CHANGELOG describe the rule in the same words; the CHANGELOG names the constructor change for users of the `Ninlil.Dns.Server.ClusterSync` package. Follow-ups filed as #465: an exact timestamp tie can settle differently on two nodes (older behaviour), and a second collision from the same creating node repeats a renamed name (that one envelope is skipped with an error log; the stream carries on). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #450

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Closes #450

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Closes #450

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Merge develop into the cluster conflict rename branch
All checks were successful
Build / Compute Version (pull_request) Has been skipped
Build / Test .NET on Windows (pull_request) Has been skipped
Build / Windows Test Gate (pull_request) Has been skipped
Build / Test Admin Console (pull_request) Successful in -1m32s
Build / Lint and Script Tests (pull_request) Successful in -2m3s
Build / Test .NET (pull_request) Successful in 2m58s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Has been skipped
Build / Stage Draft Release (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (common) (pull_request) Has been skipped
Build / Build Binary (linux-amd64) (pull_request) Has been skipped
Build / Build Binary (linux-arm64) (pull_request) Has been skipped
Build / Build Binary (macos-amd64) (pull_request) Has been skipped
Build / Build Binary (macos-arm64) (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (pull_request) Has been skipped
Build / Build Arch Linux Packages (pull_request) Has been skipped
Build / Build and Test Deb and RPM Packages (pull_request) Has been skipped
Build / Build and Push Image (pull_request) Has been skipped
Build / Smoke Test the Windows Binary (pull_request) Has been skipped
Build / Publish Release (pull_request) Has been skipped
Build / Pipeline (pull_request) Successful in 0s
b369f79a22
Refs #450

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

# Conflicts:
#	CHANGELOG.md
claude merged commit 3907af9cd7 into develop 2026-11-14 11:22:01 -05:00
claude deleted branch feature/450-cluster-conflict-rename-node-id 2026-11-14 11:22:02 -05:00
Sign in to join this conversation.
No reviewers
No milestone
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.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!466
No description provided.