Skip to content

Keep every node's registrations so all nodes agree after net splits. - #97

Open
ostinelli wants to merge 32 commits into
masterfrom
v3.5
Open

ostinelli wants to merge 32 commits into
masterfrom
v3.5

Conversation

@ostinelli

@ostinelli ostinelli commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

This changes how nodes keep registrations, so that every node ends up showing the same process for each name after a net split, including partial ones where some nodes still see each other. It addresses #96.

What changes

  • Every node keeps all the registrations the other nodes sent it, as each node last sent them, not only the one it shows. It changes another node's registrations only when that node tells it to.
  • When a name is registered on more than one node, a node shows its own process if it has one, otherwise the most recent one (the node name breaks ties). When the process it shows goes away, for any reason, it shows the next one.
  • In a conflict, the node whose process loses drops it and tells the others. The node whose process wins does nothing. Both nodes give the resolver the two registrations in the same order, so a resolver that only looks at its arguments keeps the same process on both.
  • A registration or update called for a process on another node is done by that process' node, and the result reaches the caller's node in order with everything else that node sends. A lookup right after the call sees it.
  • A frozen node (for example stopped with SIGSTOP) doesn't slow down the others: what goes to it waits until it reads again.
  • Hidden nodes don't take part in syncing. Calls from them still work.

Upgrading

3.5 nodes only sync with 3.5 nodes. A cluster running both versions splits in two, and the same name can then be registered once on each side. All nodes need to be upgraded together, or the new version started as a separate cluster. The README section "Running different versions together" has the details.

Tests

ostinelli and others added 30 commits October 24, 2026 12:52
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Each of the two nodes passed the other node's registration first and its own
second, so a resolver that depends on the order, for example to break a tie,
could keep its own process on both nodes, which then disagreed for good.
Both nodes now pass them sorted by node name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…_auto_connect.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… an update.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ostinelli and others added 2 commits November 7, 2026 18:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant