fix some tests in the test suite
parent
078d23bc30
commit
6e70b7efc7
|
@ -316,7 +316,7 @@ func (s *RaftServer) CompactLog() {
|
||||||
|
|
||||||
func (s *RaftServer) CommittedAllChanges() bool {
|
func (s *RaftServer) CommittedAllChanges() bool {
|
||||||
entries := s.raftServer.LogEntries()
|
entries := s.raftServer.LogEntries()
|
||||||
if len(entries) == 0 {
|
if s.raftServer.CommitIndex() == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
lastIndex := entries[len(entries)-1].Index()
|
lastIndex := entries[len(entries)-1].Index()
|
||||||
|
|
Loading…
Reference in New Issue