version 0.7.0
The code below,when "raft_send_appendentries" return not 0,the cycle will return. So if raft_node A is offline, B need send appendentries to A and C ,send A callback return -1,here return, C will not receive heatbeat?C will request vote?
int raft_send_appendentries_all(raft_servert* me)
{
raft_server_private_t me = (raft_server_private_t)me_;
int i, e;
__log(me_, NULL, "%s:%d num node=%d",__FILE__, __LINE__, me->num_nodes);
me->timeout_elapsed = 0;
for (i = 0; i < me->num_nodes; i++)
{
if (me->node == me->nodes[i] || !raft_node_is_active(me->nodes[i]))
continue;
e = raft_send_appendentries(me_, me->nodes[i]);
if (0 != e)
return e;
}
return 0;
version 0.7.0 The code below,when "raft_send_appendentries" return not 0,the cycle will return. So if raft_node A is offline, B need send appendentries to A and C ,send A callback return -1,here return, C will not receive heatbeat?C will request vote?
int raft_send_appendentries_all(raft_servert* me) { raft_server_private_t me = (raft_server_private_t)me_; int i, e;
}