Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raftstore:Fix log append reject response bug about MsgUnreachable msg #12409

Closed
wants to merge 19 commits into from

Conversation

tier-cap
Copy link
Collaborator

What is changed and how it works?

Issue Number: Close #11371

What's Changed:

When leader receives a MsgUnreachable message from follower, it should call the raft step directly.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM
  • Breaking backward compatibility

Release note

None.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 21, 2022
@@ -2061,6 +2061,14 @@ where
return Ok(());
}

if matches!(msg_type, MessageType::MsgUnreachable) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can it receive the MsgUnreachable? Is there any test case to verify it's actually working?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by checking whether the progress state to this peer is Probe, is ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's too hacky. The point of making it unreachable is to hint leader don't send any further messages. You should check the behavior instead of checking some properties.

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 21, 2022
Signed-off-by: tier-cap <[email protected]>
@tier-cap tier-cap force-pushed the fix-log-append-reject-bug branch from 4426fb1 to c0ab628 Compare April 21, 2022 13:04
@tier-cap tier-cap changed the title raftstore:Fix log append reject response bug aobut MsgUnreachable msg raftstore:Fix log append reject response bug about MsgUnreachable msg Apr 28, 2022
@ti-chi-bot
Copy link
Member

@tier-cap: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2022
@tonyxuqqi tonyxuqqi closed this Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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