-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Hello! I found some issues that may cause catastrophic consequences. I created a PR #118. Seems that some issues have been fixed. Here are the issues that have not been fixed. They may be bugs or improper use of the library.
- raft_recv_appendentries#L746 when ae->prev_log_idx==0, entries will be appended unconditionally even if logs have been compacted, causing the corresponding compacted AE entries to be appended twice.
- raft_begin_load_snapshot#L1553 log may mismatch. It is necessary to load the snapshot in this case. It causes the server to lag until the next snapshot is received.
- raft_recv_appendentries#L768 log at prev_log_idx may have been compacted. In this case, compacted logs in AE entries should be treated as committed logs and remaining matching logs should be appended to log. This causes performance degradation.
- raft_send_appendentries_all#L1303 returns immediately if raft_send_appendentries returns a non-zero value. However, the return value maybe RAFT_ERR_NEEDS_SNAPSHOT. It seems that sending AE to different servers should be irrelevant. Plus 2. mentioned above, it can cause the entire cluster to fail to progress.
- raft_recv_appendentries_response#L626 next_idx can be decreased to equal match idx, causing the matched logs to be retransmitted.
I would be happy to help. And I am looking forward to your reply!
Metadata
Metadata
Assignees
Labels
No labels