raft-rs
raft-rs copied to clipboard
raft:Fix one log append reject bug about MsgUnreachable msg
Problem Description: close tikv/tikv#11371
- When follower reject the appendlog requests, it will send a MsgUnreachable msg to leader
- But the MsgUnreachable is a local type which means only be used in inner raftcore, cannot transfered by net, which leads to some logic check failed.
Solution:
- Let the MsgUnreachable be a response message, and when leader receives, call the raft core step directly.
I don't think it's a good idea. Internal messages mean we are subject to change without breaking any compatibility. You should define a new message on the TiKV side.
I don't think it's a good idea. Internal messages mean we are subject to change without breaking any compatibility. You should define a new message on the TiKV side.
I have two fix, one is this pr, the other is add a new msg type. but the change is more tthan this. And, this pr has changed this msg to not inner.