commit
5ed9d2edb5
|
@ -849,7 +849,7 @@ func (s *Server) processAppendEntriesResponse(resp *AppendEntriesResponse) {
|
||||||
for _, peer := range s.peers {
|
for _, peer := range s.peers {
|
||||||
indices = append(indices, peer.getPrevLogIndex())
|
indices = append(indices, peer.getPrevLogIndex())
|
||||||
}
|
}
|
||||||
sort.Sort(uint64Slice(indices))
|
sort.Sort(sort.Reverse(uint64Slice(indices)))
|
||||||
|
|
||||||
// We can commit up to the index which the majority of the members have appended.
|
// We can commit up to the index which the majority of the members have appended.
|
||||||
commitIndex := indices[s.QuorumSize()-1]
|
commitIndex := indices[s.QuorumSize()-1]
|
||||||
|
|
Loading…
Reference in New Issue