-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cherry pick all 0.4.x #263
Conversation
This PR introduces two simple and lite weight interfaces: - ping to trigger heartbeats without ticking, - status_ref to borrow the progress set instead of cloning.
* raft: leader respond to learner read index message (tikv#220) Signed-off-by: nolouch <[email protected]> * Bump to v0.4.3 Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two of the commits are empty and one (bump to 0.4.3) has a description which doesn't reflect the contents (there is no version bump, but is a test). I think it would be better to make the commits a bit more organised, but I don't feel strongly if you want to keep the descriptions matching the 0.4.x branch. Otherwise, it looks good!
@nrc some commits are empty because the work has been done in both master and 0.4.x branch. Let's keep the original commit log so that we can trace it one by one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@overvenus Would you like to take a look? |
src/raft.rs
Outdated
if m.index < self.raft_log.committed { | ||
debug!( | ||
self.logger, | ||
"got message with lower index than committed."; | ||
"tag" => &self.tag, | ||
); | ||
let mut to_send = Message::default(); | ||
to_send.to = m.from; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dup with line 2119.
src/raft.rs
Outdated
let mut to_send = Message::default(); | ||
to_send.to = m.from; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
This is blocked by #264. |
a574621
src/raft.rs
Outdated
if !ents.is_empty() { | ||
if !util::is_continuous_ents(msg, ents) { | ||
return is_batched; | ||
} | ||
let mut batched_entries = msg.take_entries(); | ||
let mut batched_entries: Vec<_> = msg.take_entries().into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the conversion is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take_entries()
return a RepeatedField
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepeatedField
has push
too, so I think the conversion is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conversion is to support switching prost and rust-protobuf without modification of code.
task list: