raft-rs icon indicating copy to clipboard operation
raft-rs copied to clipboard

raft:Fix one log append reject bug about MsgUnreachable msg

Open tier-cap opened this issue 2 years ago • 2 comments

Problem Description: close tikv/tikv#11371

  1. When follower reject the appendlog requests, it will send a MsgUnreachable msg to leader
  2. 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:

  1. Let the MsgUnreachable be a response message, and when leader receives, call the raft core step directly.

tier-cap avatar Apr 21 '22 13:04 tier-cap

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.

BusyJay avatar Apr 21 '22 13:04 BusyJay

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.

tier-cap avatar Apr 21 '22 14:04 tier-cap