Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
Signed-off-by: gengliqi <gengliqiii@gmail.com>
  • Loading branch information
gengliqi committed Nov 3, 2020
1 parent d72d121 commit 3268b63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/five_mem_node/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ fn on_ready(
handle_messages(res.take_messages());
// Apply all committed entries.
handle_committed_entries(raft_group, res.take_committed_entries());
// Advance the apply index.
raft_group.advance_apply();
}

fn example_config() -> Config {
Expand Down
2 changes: 2 additions & 0 deletions examples/single_mem_node/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ fn on_ready(raft_group: &mut RawNode<MemStorage>, cbs: &mut HashMap<u8, ProposeC
handle_messages(res.take_messages());
// Apply all committed entries.
handle_committed_entries(res.take_committed_entries());
// Advance the apply index.
raft_group.advance_apply();
}

fn send_propose(logger: Logger, sender: mpsc::Sender<Msg>) {
Expand Down

0 comments on commit 3268b63

Please sign in to comment.