Skip to content

Commit

Permalink
raft_anim topo, faster reconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
Willfrit committed May 15, 2019
1 parent d4de217 commit 02c1b67
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion app_test/raft_anim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
Raft leader election implementation with anim log (see tools)
<?xml version="1.0" encoding="ISO-8859-1"?>
<topology>
<vertices>
<vertex int_idx="1" role="virtnode" int_vn="1"/>
<vertex int_idx="2" role="virtnode" int_vn="2"/>
<vertex int_idx="3" role="virtnode" int_vn="3"/>
</vertices>
<edges>
<edge int_idx="1" int_src="1" int_dst="2" specs="normal"/>
<edge int_idx="2" int_src="1" int_dst="3" specs="normal"/>
<edge int_idx="3" int_src="2" int_dst="1" specs="normal"/>
<edge int_idx="4" int_src="2" int_dst="3" specs="normal"/>
<edge int_idx="5" int_src="3" int_dst="1" specs="normal"/>
<edge int_idx="6" int_src="3" int_dst="2" specs="normal"/>
</edges>
<specs>
<normal dbl_kbps="1520" int_delayms="200"/>
</specs>
</topology>
--]]

function aUpdateState(state, term)
Expand Down Expand Up @@ -256,7 +275,7 @@ events.run(function()
net.client(n, {initialize = init, send = send, receive = receive, finalize = final})
end
end
events.sleep(5)
events.sleep(1)
end
end)

Expand Down

0 comments on commit 02c1b67

Please sign in to comment.