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

Pass pending_vote to Follower::new as an argument explicitly #30

Merged
merged 1 commit into from
May 8, 2019
Merged

Pass pending_vote to Follower::new as an argument explicitly #30

merged 1 commit into from
May 8, 2019

Conversation

shinnya
Copy link
Contributor

@shinnya shinnya commented Apr 25, 2019

#29 を修正する PR です。詳細は issue を確認してください。

@shinnya shinnya marked this pull request as ready for review April 26, 2019 05:57
@@ -309,8 +313,7 @@ where
if m.log_tail.is_newer_or_equal_than(self.history.tail()) {
// 送信者(候補者)のログは十分に新しいので、その人を支持する
let candidate = m.header.sender.clone();
self.unread_message = Some(Message::RequestVoteCall(m));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FollowerInit に受け渡すために利用されていたようですが、明示的に処理待ちの RequestVoteCallFollower に渡すようにしたため不要になっているはずです。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

self.pending_vote = Some(m.header);

unread_message が効いてくるのはここ。

Copy link
Member

@sile sile left a comment

Choose a reason for hiding this comment

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

LGTM

@shinnya shinnya merged commit df7ece9 into frugalos:master May 8, 2019
@shinnya shinnya deleted the fix-request-vote-unreply branch May 8, 2019 07:15
@shinnya shinnya mentioned this pull request May 15, 2019
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.

3 participants