You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I applied one log item to three nodes, and persisted.
delete persist data from one node (not leader) and start raft (other nodes keep alive).
raft log will not be applied for this node, there is some log on this node:
raft: AE no log at prev_idx 1
send: {"myid": 1, "message_type": "append_entries_response", "term": 1, "success": 0, "current_idx": 0, "first_idx": 2}
Then it will be loopback forever.
The text was updated successfully, but these errors were encountered:
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_from_idx(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:
raft: AE no log at prev_idx 1
send: {"myid": 1, "message_type": "append_entries_response", "term": 1, "success": 0, "current_idx": 0, "first_idx": 2}
Then it will be loopback forever.
The text was updated successfully, but these errors were encountered: