A cluster join names a renamed account or role after the node that created it, never with an all-zero node id #466
No reviewers
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.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!466
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/450-cluster-conflict-rename-node-id"
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?
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 bootstrapadminaccount andAdministratorsrole), so a join producedadmin-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.Tests75,Ninlil.Dns.Server.Cluster.Tests76, the Docker backfill integration tests 54,Ninlil.Web.Testsapart from the twoSpaFallbackTeststhat need a built console.README (clustering), the wiki page
pages/docs/guides/operations/clustering.mdand the CHANGELOG describe the rule in the same words; the CHANGELOG names the constructor change for users of theNinlil.Dns.Server.ClusterSyncpackage.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