bump(github.com/coreos/raft): ca61124b291fe38a2ab592a8b42f1423e3c31cc4

This commit is contained in:
Ben Johnson 2013-12-27 15:24:37 -07:00
parent 2504c4ad34
commit 44af8ea190
4 changed files with 4 additions and 10 deletions

View File

@ -2,8 +2,7 @@ package raft
// Join command interface
type JoinCommand interface {
CommandName() string
Apply(server Server) (interface{}, error)
Command
NodeName() string
}

View File

@ -2,8 +2,7 @@ package raft
// Leave command interface
type LeaveCommand interface {
CommandName() string
Apply(server Server) (interface{}, error)
Command
NodeName() string
}

View File

@ -74,11 +74,7 @@ func (l *Log) CommitIndex() uint64 {
func (l *Log) currentIndex() uint64 {
l.mutex.RLock()
defer l.mutex.RUnlock()
if len(l.entries) == 0 {
return l.startIndex
}
return l.entries[len(l.entries)-1].Index
return l.internalCurrentIndex()
}
// The current index in the log without locking

View File

@ -176,7 +176,7 @@ func NewServer(name string, path string, transporter Transporter, stateMachine S
return c.Apply(&context{
server: s,
currentTerm: s.currentTerm,
currentIndex: s.log.currentIndex(),
currentIndex: s.log.internalCurrentIndex(),
commitIndex: s.log.commitIndex,
})
case deprecatedCommandApply: