Skip to content

Commit

Permalink
Track LogNoop commit index
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep authored Oct 15, 2024
1 parent 2b0032e commit 8d45708
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,12 @@ func (r *Raft) leaderLoop() {
break
}

// Update the Noop commit index so clients know the index
// at which leadership was conclusively established.
if commitLog.log.Type == LogNoop {
r.setNoopCommitindex(commitLog.log.Index)

Check failure on line 819 in raft.go

View workflow job for this annotation

GitHub Actions / go-fmt-and-vet

r.setNoopCommitindex undefined (type *Raft has no field or method setNoopCommitindex)
}

// Measure the commit time
metrics.MeasureSince([]string{"raft", "commitTime"}, commitLog.dispatch)
groupReady = append(groupReady, e)
Expand Down

0 comments on commit 8d45708

Please sign in to comment.