From 6e70b7efc70fdc5327e7139f27e30ff7a1fa06bb Mon Sep 17 00:00:00 2001 From: John Shahid Date: Tue, 29 Apr 2014 17:57:23 -0400 Subject: [PATCH] fix some tests in the test suite --- src/coordinator/raft_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coordinator/raft_server.go b/src/coordinator/raft_server.go index c39ec912af..f85fedb823 100644 --- a/src/coordinator/raft_server.go +++ b/src/coordinator/raft_server.go @@ -316,7 +316,7 @@ func (s *RaftServer) CompactLog() { func (s *RaftServer) CommittedAllChanges() bool { entries := s.raftServer.LogEntries() - if len(entries) == 0 { + if s.raftServer.CommitIndex() == 0 { return false } lastIndex := entries[len(entries)-1].Index()