Skip to content

raft:Fix one log append reject bug about MsgUnreachable msg#475

Open
tier-cap wants to merge 2 commits into
tikv:masterfrom
tier-cap:fix-log-append-reject-bug
Open

raft:Fix one log append reject bug about MsgUnreachable msg#475
tier-cap wants to merge 2 commits into
tikv:masterfrom
tier-cap:fix-log-append-reject-bug

Conversation

@tier-cap

@tier-cap tier-cap commented Apr 21, 2022

Copy link
Copy Markdown

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.

Signed-off-by: tier-cap <zhengxiaojin@pingcap.com>
close tikv/tikv#11371
Signed-off-by: tier-cap <zhengxiaojin@pingcap.com>

Signed-off-by: tier-cap <zhengxiaojin@pingcap.com>
@tier-cap tier-cap force-pushed the fix-log-append-reject-bug branch from 1f58409 to 3dc6ec5 Compare April 21, 2022 13:07
@BusyJay

BusyJay commented Apr 21, 2022

Copy link
Copy Markdown
Member

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.

@tier-cap

tier-cap commented Apr 21, 2022

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tikv error in log: Raft raft: cannot step raft local message

2 participants