Skip to content
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

Merged
merged 9 commits into from
Jul 19, 2019
Merged

Cherry pick all 0.4.x #263

merged 9 commits into from
Jul 19, 2019

Conversation

hicqu
Copy link
Contributor

@hicqu hicqu commented Jul 17, 2019

task list:

  • cherry pick all commits from 0.4.x to master
  • fix all test cases

BusyJay and others added 5 commits July 17, 2019 14:02
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]>
@hicqu hicqu requested review from BusyJay, Hoverbear and nrc July 17, 2019 07:24
Copy link
Contributor

@nrc nrc left a 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!

@hicqu hicqu requested a review from overvenus July 17, 2019 09:40
@hicqu
Copy link
Contributor Author

hicqu commented Jul 17, 2019

@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.
Now all test cases are fixed. PTAL thank you!

nrc
nrc previously approved these changes Jul 17, 2019
Copy link
Contributor

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BusyJay
BusyJay previously approved these changes Jul 18, 2019
@BusyJay
Copy link
Member

BusyJay commented Jul 18, 2019

@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;
Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

src/storage.rs Show resolved Hide resolved
tests/integration_cases/test_raft.rs Outdated Show resolved Hide resolved
@hicqu hicqu dismissed stale reviews from BusyJay and nrc via bd43634 July 18, 2019 07:44
overvenus
overvenus previously approved these changes Jul 18, 2019
BusyJay
BusyJay previously approved these changes Jul 18, 2019
@BusyJay
Copy link
Member

BusyJay commented Jul 18, 2019

This is blocked by #264.

Hoverbear
Hoverbear previously approved these changes Jul 18, 2019
@BusyJay BusyJay dismissed stale reviews from Hoverbear, overvenus, and themself via a574621 July 19, 2019 11:48
@Hoverbear Hoverbear added this to the 0.6.0 milestone Jul 19, 2019
@Hoverbear Hoverbear merged commit 1377cb6 into tikv:master Jul 19, 2019
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();
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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.

@hicqu hicqu deleted the cherry-pick-all-0.4.x branch July 22, 2019 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants