Skip to content

Commit

Permalink
tracker: add comments for Match and Next fields
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kalinnikov <[email protected]>
  • Loading branch information
pav-kv committed Jan 24, 2024
1 parent e22adc0 commit 11c051a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tracker/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ import (
// strewn around `*raft.raft`. Additionally, some fields are only used when in a
// certain State. All of this isn't ideal.
type Progress struct {
Match, Next uint64
// Match is log index up to which the follower's log matches the leader's.
Match uint64
// Next is the index of the next log entry to be sent to the follower. Entries
// in the (Match, Next) interval are on the fly to this follower.
Next uint64
// State defines how the leader should interact with the follower.
//
// When in StateProbe, leader sends at most one replication message
Expand Down

0 comments on commit 11c051a

Please sign in to comment.