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

store/helper, infoschema: fix the bug that cannot find down-peer #24881

Merged
merged 2 commits into from
May 27, 2021

Conversation

HunDunDM
Copy link
Contributor

@HunDunDM HunDunDM commented May 25, 2021

Signed-off-by: HunDunDM hundundm@gmail.com

What problem does this PR solve?

Issue Number: close #24879

Problem Summary:

The STATUS field data in the TIKV_REGION_PEERS table is incorrect.

What is changed and how it works?

What's Changed: Fix wrong struct definition

kvproto/proto/pdpb.proto#L308

  • Before
SELECT * FROM INFORMATION_SCHEMA.TIKV_REGION_PEERS WHERE PEER_ID=69;
+-----------+---------+----------+------------+-----------+--------+--------------+
| REGION_ID | PEER_ID | STORE_ID | IS_LEARNER | IS_LEADER | STATUS | DOWN_SECONDS |
+-----------+---------+----------+------------+-----------+--------+--------------+
|        54 |      69 |        1 |          0 |         0 | NORMAL |         NULL |
+-----------+---------+----------+------------+-----------+--------+--------------+
  • After
SELECT * FROM INFORMATION_SCHEMA.TIKV_REGION_PEERS WHERE PEER_ID=69;
+-----------+---------+----------+------------+-----------+--------+--------------+
| REGION_ID | PEER_ID | STORE_ID | IS_LEARNER | IS_LEADER | STATUS | DOWN_SECONDS |
+-----------+---------+----------+------------+-----------+--------+--------------+
|        54 |      69 |        1 |          0 |         0 | DOWN   |          325 |
+-----------+---------+----------+------------+-----------+--------+--------------+

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

  • Fix the bug that TIKV_REGION_PEERS table did not have the correct DOWN status.

Signed-off-by: HunDunDM <hundundm@gmail.com>
@HunDunDM HunDunDM requested a review from a team as a code owner May 25, 2021 08:06
@HunDunDM HunDunDM requested review from wshwsh12 and removed request for a team May 25, 2021 08:06
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 25, 2021
@HunDunDM
Copy link
Contributor Author

/cc @winoros

@ti-chi-bot ti-chi-bot requested a review from winoros May 25, 2021 08:07
@HunDunDM
Copy link
Contributor Author

/label needs-cherry-pick-5.0
/label needs-cherry-pick-4.0

@ti-chi-bot
Copy link
Member

@disksing: Thanks for your review. The bot only counts /lgtm from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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 ti-community-infra/tichi repository.

@nolouch nolouch removed the sig/execution SIG execution label May 25, 2021
@nolouch
Copy link
Member

nolouch commented May 25, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 25, 2021
@github-actions github-actions bot added the sig/execution SIG execution label May 25, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nolouch
  • winoros

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 27, 2021
@Yisaer
Copy link
Contributor

Yisaer commented May 27, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: c083911

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 27, 2021
@ti-chi-bot
Copy link
Member

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

@ti-chi-bot ti-chi-bot merged commit 96ab4a3 into pingcap:master May 27, 2021
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request May 27, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #24918

@HunDunDM HunDunDM deleted the down-peer-status branch May 27, 2021 05:28
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request May 27, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #24919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-5.0 sig/execution SIG execution size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The STATUS field data in the TIKV_REGION_PEERS table is incorrect
7 participants