Open clicx opened 5 years ago
Is here problem? Because current node has no entry, ety always null therefor cause endless loop
/ Not the first appendentries we've received / / NOTE: the log starts at 1 / if (0 < ae->prev_log_idx) { raft_entry_t* ety = raft_get_entry_fromidx(me, ae->prev_log_idx);
/* 2. Reply false if log doesn't contain an entry at prevLogIndex
whose term matches prevLogTerm (§5.3) */
if (!ety)
{
__log(me_, node, "AE no log at prev_idx %d", ae->prev_log_idx);
goto out;
}
I have done the following testing:
Then it will be loopback forever.