RaftTraceEvent

Types

Link copied to clipboard
data class AdvanceCommitIndex(val clock: Long, val node: NodeId, val oldCommitIndex: Long, val newCommitIndex: Long) : RaftTraceEvent

commitIndex advanced.

Link copied to clipboard
data class AppendEntries(val clock: Long, val from: NodeId, val to: NodeId, val term: Long, val prevLogIndex: Long, val prevLogTerm: Long, val entryCount: Int, val leaderCommit: Long) : RaftTraceEvent

AppendEntries RPC sent (including heartbeats — entryCount=0).

Link copied to clipboard
data class AppendEntriesAccepted(val clock: Long, val from: NodeId, val to: NodeId, val matchIndex: Long) : RaftTraceEvent

AppendEntries accepted by follower.

Link copied to clipboard
data class AppendEntriesRejected(val clock: Long, val from: NodeId, val to: NodeId, val conflictIndex: Long?, val conflictTerm: Long?) : RaftTraceEvent

AppendEntries rejected by follower.

Link copied to clipboard
data class BecomeFollower(val clock: Long, val node: NodeId, val term: Long, val reason: StepDownReason) : RaftTraceEvent

Node stepped down to follower.

Link copied to clipboard
data class BecomeLeader(val clock: Long, val node: NodeId, val term: Long) : RaftTraceEvent

Node became leader.

Link copied to clipboard
data class ClientRequest(val clock: Long, val node: NodeId, val index: Long, val term: Long) : RaftTraceEvent

A client proposal was appended to the leader's log.

Link copied to clipboard
data class Compacted(val clock: Long, val node: NodeId, val throughIndex: Long, val throughTerm: Long) : RaftTraceEvent

Log prefix discarded after a compaction.

Link copied to clipboard
data class ConfigChange(val clock: Long, val node: NodeId, val index: Long, val old: ClusterConfig?, val new: ClusterConfig) : RaftTraceEvent

A config entry was appended to the log (adopted on append, per §6). Emitted by both the leader (on RaftNode.changeMembership) and followers (on receiving the AppendEntries carrying the config entry). This is the primary assertion point for membership-change tests — config and term are private engine state, so tests observe transitions through this event.

Link copied to clipboard
data class InstallSnapshot(val clock: Long, val from: NodeId, val to: NodeId, val lastIncludedIndex: Long, val offset: Long, val done: Boolean) : RaftTraceEvent

§7 InstallSnapshot chunk sent to a follower whose needed prefix has been compacted away.

Link copied to clipboard
data class InstallSnapshotAccepted(val clock: Long, val from: NodeId, val to: NodeId, val lastIncludedIndex: Long) : RaftTraceEvent

A follower finished reassembling and installed a snapshot.

Link copied to clipboard
data class LeadershipTransferAbandoned(val clock: Long, val leader: NodeId, val target: NodeId, val reason: LeadershipTransferAbandonReason) : RaftTraceEvent

A leadership transfer was abandoned — either because the auto-timeout expired before the target won an election, or because RaftNode.cancelTransfer was called explicitly. reason describes which path fired. Normal proposal acceptance is resumed.

Link copied to clipboard
data class LeadershipTransferStarted(val clock: Long, val leader: NodeId, val target: NodeId) : RaftTraceEvent

The leader started a leadership transfer to target. Proposals are blocked until the transfer completes or is abandoned.

Link copied to clipboard
data class PreVoteDenied(val clock: Long, val node: NodeId, val to: NodeId, val proposedTerm: Long, val reason: DenyReason) : RaftTraceEvent

Node denied a pre-vote to a candidate.

Link copied to clipboard
data class PreVoteGranted(val clock: Long, val node: NodeId, val to: NodeId, val proposedTerm: Long) : RaftTraceEvent

Node granted a pre-vote to a candidate.

Link copied to clipboard
data class PreVoteStarted(val clock: Long, val node: NodeId, val proposedTerm: Long) : RaftTraceEvent

Pre-vote phase started: candidate broadcasts hypothetical-term requests.

Link copied to clipboard
data class ReadIndexConfirmed(val clock: Long, val readIndex: Long, val term: Long) : RaftTraceEvent

The leader confirmed quorum freshness for a linearizable read at readIndex in term. No log entry is written for the read. Emitted once per pending read as it resolves.

Link copied to clipboard
data class RequestVote(val clock: Long, val from: NodeId, val to: NodeId, val term: Long, val lastLogIndex: Long, val lastLogTerm: Long) : RaftTraceEvent

RequestVote RPC sent.

Link copied to clipboard
data class Timeout(val clock: Long, val node: NodeId, val newTerm: Long) : RaftTraceEvent

Election timeout fired; node becomes candidate.

Link copied to clipboard
data class VoteDenied(val clock: Long, val from: NodeId, val to: NodeId, val term: Long, val reason: DenyReason) : RaftTraceEvent

Vote denied to a candidate.

Link copied to clipboard
data class VoteGranted(val clock: Long, val from: NodeId, val to: NodeId, val term: Long) : RaftTraceEvent

Vote granted to a candidate.

Properties

Link copied to clipboard
abstract val clock: Long

Logical monotonic clock — incremented on every emitted event.