Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

termAt can return wrong term for first item #38

Open
schuster opened this issue Apr 15, 2015 · 1 comment
Open

termAt can return wrong term for first item #38

schuster opened this issue Apr 15, 2015 · 1 comment
Milestone

Comments

@schuster
Copy link

The termAt method will return the wrong term in the case where the first entry in the log actually comes from a term other than term 1 (could happen if multiple elections occur before a request is sent). This is related to the inconsistent use of index numbers - the test should be for an index less than 0, not less than or equal to.

@colin-scott
Copy link
Contributor

For what it's worth, I have a (non-pull-request-worthy) fix for this issue here:

NetSys/demi-applications@1840499

Tested by fuzz testing -- I verified that under non-failing scenarios, this behaves correctly at each step of the execution when replicated two client commands.

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

No branches or pull requests

3 participants