Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
area: distributedDistributed coordination and consensuseffort: mediumMedium effort - 1-2 dayspriority: highImportant issue that should be addressed soonresolution: wontfixWill not be fixed/implementedtype: bugSomething isn't working as expected
Description
Context
broadcastProposal in internal/distributed/consensus.go:754 contains:
// For simulation, automatically accept our own proposals after a delay
go func() {
time.Sleep(100 * time.Millisecond)
ce.voteOnProposal(proposal.ID, true)
}()This means configuration change proposals are never sent to other nodes. The proposal system is completely non-functional in a real cluster — only self-accepting proposals on a single node.
What to implement
Add to internal/distributed/gossip.go:
MessageTypeProposal MessageType = "proposal"
MessageTypeProposalVote MessageType = "proposal_vote"
type ProposalVoteMessage struct {
ProposalID string `json:"proposal_id"`
NodeID string `json:"node_id"`
Accept bool `json:"accept"`
}Replace broadcastProposal implementation:
- Marshal the
ConsensusProposalas the gossip message data - Call
ce.cluster.gossip.sendConsensusMsg(node.Address, MessageTypeProposal, proposal)for each alive peer (mirrors the pattern insendVoteRequests) - Vote for the local node immediately via
ce.voteOnProposal(proposal.ID, true)— no goroutine, no sleep - Remove the simulation goroutine entirely
Add handleNetworkProposal(msg *GossipMessage) in consensus.go:
- Unmarshal the proposal
- Call
ce.voteOnProposalwith the local decision (for now, always accept — byzantine fault tolerance is future work) - Send a
ProposalVoteMessageback to the proposer
Add handleNetworkProposalVote(msg *GossipMessage):
- Unmarshal the vote
- Call
ce.voteOnProposal(proposalID, vote.Accept)with the voter's identity
Register both handlers in gossip.go's handleIncomingMessage switch.
Acceptance criteria
broadcastProposalsends UDP to all alive peers- Simulation goroutine with
time.Sleepis removed - Two-node integration test: node A proposes a leadership change, node B's vote is received and counted
go test -race ./internal/distributed/...passes
Sequencing
Depends on A1-2 (new message types should align with the canonical ConsistencyLevel promotion, though not strictly required).
Metadata
Metadata
Assignees
Labels
area: distributedDistributed coordination and consensuseffort: mediumMedium effort - 1-2 dayspriority: highImportant issue that should be addressed soonresolution: wontfixWill not be fixed/implementedtype: bugSomething isn't working as expected
Activity
scttfrdmn commentedon Aug 3, 2026
Closing as not-the-direction, per the decision on #169 — but with a caveat worth reading, because this issue is half real.
§5 of
docs/design/conditional-writes-vs-raft.mdputs it precisely: "Proposals are a consensus concept; gossip still needs real broadcast for membership, so the networking work survives even though the proposal framing does not."So the defect this issue reports is genuine —
broadcastProposalreally is atime.Sleep(100ms)that self-accepts and sends nothing. What goes away is the thing being broadcast. There are no proposals to carry once there is no replicated log to change membership through, soMessageTypeProposal/MessageTypeProposalVoteandConsensusProposalare not being wired up.The surviving half — real gossip broadcast to alive peers — is already in place and has been exercised since: #279 got a three-node cluster forming and electing a single leader race-free, and #280 fixed the datagram size ceiling that was silently truncating the memberlist sync (the default held two members).
sendConsensusMsgand thesendVoteRequestspattern this issue points at as the model are real, working code.If the simulation stub is still sitting in
consensus.goafter the CAS work replacesexecuteStrongConsistency, it should be deleted rather than fixed — filed as part of the taxonomy cleanup issue.Reference: https://github.com/scttfrdmn/objectfs/blob/main/docs/design/conditional-writes-vs-raft.md
docs: record the CAS decision where the code claims otherwise (#286)
docs: the Raft closure list is five, not four (#287)
feat(distributed)!: replace the N-identical-PUT fan-out with per-key …