Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Bug in log.appendEntry? #5

Closed
peterbourgon opened this issue May 9, 2013 · 1 comment
Closed

Bug in log.appendEntry? #5

peterbourgon opened this issue May 9, 2013 · 1 comment
Assignees

Comments

@peterbourgon
Copy link

log.go:390:

} else if entry.index == lastEntry.index && entry.index <= lastEntry.index {
    return fmt.Errorf("raft.Log: Cannot append entry with earlier index in the same term (%x:%x <= %x:%x)", entry.term, entry.index, lastEntry.term, lastEntry.index)
}

Should the first condition be entry.term == lastEntry.term?

@benbjohnson
Copy link
Contributor

@peterbourgon Thanks for finding that. You're really digging into the code! It's checked in with this commit (2efa6b4) along with a whole bunch of other changes. I have raftd almost working. Leader election is in place and log replication is almost there. I'll send you an e-mail when it's working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants