fix(tree): skip self in WebSocket attachment candidates (#120) - #121
Merged
Conversation
The omega signed root list (or REPRAM_PEERS) can include the local node's own address. Without a self-skip, the node attaches to itself via WebSocket — becoming both substrate and transient for itself — and routes all PUTs through the self-WS connection instead of broadcasting to peers, causing 100% quorum timeout (202). Mirrors the self-skip already in bootstrapFromPeers (#87, PR #103) for the HTTP gossip path. Covers both initial attachment (index.ts) and the reattach loop's seed-list layer (tree.ts tryAlternatives). // ticktockbent
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…l-match limitation // ticktockbent
35 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
attachToSubstrate: Skip seed peers matchingconfig.address:config.httpPortbefore attempting WS connection. Same pattern as the HTTP bootstrap self-skip added in PR fix(gossip): F7 self-rejection chokepoint in addPeer + bootstrap caller skip #103 (F7: TS gossip stores self in peer map → repram_peers_active over-counts on TS nodes #87).tryAlternatives: Skip alternatives matchinglocalNode.address:localNode.httpPort. Covers all three reattach layers (goodbye payload, cached topology, seed list) — the seed-list layer used synthetic IDs that bypassed the existing node-ID filter.tryAlternativesskips self-matching entries.Closes #120.
Root cause
The omega signed root list includes the node's own address. The WS attachment logic iterated all seeds without a self-skip, so the node connected to its own WS server. This made it both substrate and transient for itself.
cluster.ts put()checkstreeManager.parent— with a self-WS parent, PUTs went through WS to self instead of HTTP broadcast to peers. Go nodes never received the PUT, the 5s write timeout fired, and ACKs arrived too late. Result: 100% 202 on all TS-originated writes.Test plan
tryAlternatives skips self-matching entries (#120)// ticktockbent