diff --git a/raft.go b/raft.go index cbc9a59a..e6183928 100644 --- a/raft.go +++ b/raft.go @@ -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) + } + // Measure the commit time metrics.MeasureSince([]string{"raft", "commitTime"}, commitLog.dispatch) groupReady = append(groupReady, e)