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

Empty batch is sent with term 1/index 1 #41

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

Empty batch is sent with term 1/index 1 #41

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

Comments

@schuster
Copy link

In AppendEntries.apply, if a batch is empty (e.g. because the follower is completely caught up and we're sending a heartbeat), the message is sent with prevLogTerm 1 and prevLogIndex 1. This is not necessarily correct; the numbers should be based off of what is actually at the end of the log.

@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