-
Notifications
You must be signed in to change notification settings - Fork 25
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
Tiny plan to fix issue 50 #51
Conversation
frugalos_mds/src/node/node.rs
Outdated
while let Async::Ready(polled) = track!(self.rlog.poll())? { | ||
if let Some(event) = polled { | ||
track!(self.handle_raft_event(event))?; | ||
match event { |
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.
I think the code can be rewritten a bit more concise as follows:
if let raftlog::Event::SnapshotLoaded { .. } = event {
track!(self.handle_raft_event(event))?;
break;
} else {
track!(self.handle_raft_event(event))?;
}
frugalos_mds/src/node/node.rs
Outdated
match event { | ||
raftlog::Event::SnapshotLoaded { .. } => { | ||
track!(self.handle_raft_event(event))?; | ||
break; |
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.
Could you add a comment about why this break
is required?
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
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. Thanks!
Please see: #50