Skip to content

[Raft] Consensus entries publishing and proposal - #1474

Merged
barroco merged 1 commit into
interuss:masterfrom
Orbitalize:add_consensus_logic_2
Jun 26, 2026
Merged

[Raft] Consensus entries publishing and proposal #1474
barroco merged 1 commit into
interuss:masterfrom
Orbitalize:add_consensus_logic_2

Conversation

@MariemBaccari

@MariemBaccari MariemBaccari commented May 20, 2026

Copy link
Copy Markdown
Contributor

Completes the consensus business logic implementation from #1473 by adding the entries publishing logic and the Execute method which will be used by the Store to commit entries to Raft.

We defined a Raft proposal as:

type Proposal struct {
	ID          string    `json:"id"`
	NodeID      uint64    `json:"node_id"`
	Timestamp   time.Time `json:"timestamp"`
	RequestType string    `json:"request_type"`
	Value       []byte    `json:"value"`
	// ReadOnly proposals do not modify the state machine and,
	// therefore, do not need to be applied by nodes who did not initiate them.
	// TODO: This is a temporary solution. In the future, we will use ReadIndex
	// for read-only operations without needing to propose them to Raft.
	ReadOnly bool `json:"read_only"`
}
  • ID is a globally unique identifier (UUID) to keep track of the proposal when it comes back as a committed entry.
  • NodeID the Raft node ID of the current DSS node.
  • Timestamp is defined by the proposing node and ensures time-dependent operations execute deterministically across nodes and replays .
  • RequestType is the type of the request (e.g. DeleteSubscription).
  • Value is the proposal payload (i.e. a serialized representation of an ASTM API operation).
  • ReadOnly proposals are currently processed the same as ReadWrite operations. They go through Raft as a proposal to ensure serializability. In the future, we will use ReadIndex to maintain these guarantees while avoiding the consensus round.

@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 4 times, most recently from 7638cf6 to 6634f6d Compare May 20, 2026 15:03
@MariemBaccari
MariemBaccari marked this pull request as ready for review May 20, 2026 15:05
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 7 times, most recently from 1936648 to 61e02eb Compare May 22, 2026 08:19

@the-glu the-glu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MariemBaccari MariemBaccari changed the title [Raft] Add part 2 of consensus logic [Raft] Consensus entries publishing and proposal Jun 2, 2026
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 3 times, most recently from de47db1 to 6ac71b6 Compare June 8, 2026 14:52
@MariemBaccari
MariemBaccari marked this pull request as draft June 8, 2026 15:04
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 2 times, most recently from 0558805 to 4af41b1 Compare June 11, 2026 09:43
@MariemBaccari
MariemBaccari marked this pull request as ready for review June 11, 2026 09:58
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 4 times, most recently from 4e1735c to 3583410 Compare June 16, 2026 13:14

@barroco barroco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partital review. Please consider the comments

Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/proposal.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch from 40a6736 to 1a5ba8f Compare June 17, 2026 07:51
@barroco barroco added the dss-raft Relating to the application-layer consensus implemenation based on raft label Jun 17, 2026
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 2 times, most recently from 7d985b0 to 1dc7929 Compare June 18, 2026 07:26
@MariemBaccari
MariemBaccari requested a review from barroco June 18, 2026 07:29
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch from 1dc7929 to 543783e Compare June 18, 2026 08:00
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 7 times, most recently from 766c397 to 3081fa8 Compare June 24, 2026 11:23

@barroco barroco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review 3

Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/proposal.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 5 times, most recently from 472c09c to bf29aa9 Compare June 26, 2026 11:12

@barroco barroco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review 4

Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go
Comment thread pkg/raftstore/consensus/consensus.go Outdated
Comment thread pkg/raftstore/consensus/consensus.go Outdated
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch 2 times, most recently from d56d2f0 to 459b98c Compare June 26, 2026 13:00
@MariemBaccari
MariemBaccari force-pushed the add_consensus_logic_2 branch from 459b98c to 235eaf4 Compare June 26, 2026 13:02
@MariemBaccari
MariemBaccari requested a review from barroco June 26, 2026 13:03
@barroco
barroco merged commit 08c878d into interuss:master Jun 26, 2026
12 checks passed
@MariemBaccari
MariemBaccari deleted the add_consensus_logic_2 branch June 30, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dss-raft Relating to the application-layer consensus implemenation based on raft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants