openraft
openraft copied to clipboard
AppendEntriesResponse should be an enum of the returned state.
Currently AppendEntriesResponse
is:
pub struct AppendEntriesResponse {
pub vote: Vote,
pub success: bool,
pub conflict: bool,
}
The leader has to check if a combination of these three fields is valid. E.g. success == true && conflict == true
is an invalid combination.
It's better be a enum like:
pub enum AppendEntriesResponse {
Ok,
HigherVoteSeen(Vote),
Conflict,
}
👋 Thanks for opening this issue!
Get help or engage by:
-
/help
: to print help messages. -
/assignme
: to assign this issue to you.
/assignme
Any updates on this issue? It seems already solved by https://github.com/datafuselabs/openraft/pull/219.
cc @drmingdrmer
Right. I forgot to close it. Thank you, my hero!