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

The STATUS field data in the TIKV_REGION_PEERS table is incorrect #24879

Closed
HunDunDM opened this issue May 25, 2021 · 1 comment · Fixed by #24881
Closed

The STATUS field data in the TIKV_REGION_PEERS table is incorrect #24879

HunDunDM opened this issue May 25, 2021 · 1 comment · Fixed by #24881
Labels
severity/moderate sig/diagnosis SIG: Diagnosis type/bug The issue is confirmed as a bug.

Comments

@HunDunDM
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  • Randomly choose a Region containing down-peer (shutdown a TiKV in the cluster and wait for a while)
  • pd-ctl region ${region_id}
  • SELECT * FROM INFORMATION_SCHEMA.TIKV_REGION_PEERS WHERE REGION_ID=${region_id};

2. What did you expect to see? (Required)

  • Their data should be consistent.

3. What did you see instead (Required)

  • Peer 691 is down but not in the SQL results.
region 689
Starting component `ctl`: /home/ubuntu/.tiup/components/ctl/v5.0.1/ctl pd -u http://10.0.1.165:2379 region 689
{
  "id": 689,
  "start_key": "7480000000000000FF335F728000000002FF64A9040000000000FA",
  "end_key": "7480000000000000FF335F728000000002FF73E6700000000000FA",
  "epoch": {
    "conf_ver": 47,
    "version": 61
  },
  "peers": [
    {
      "id": 690,
      "store_id": 100
    },
    {
      "id": 691,
      "store_id": 102
    },
    {
      "id": 692,
      "store_id": 101
    }
  ],
  "leader": {
    "id": 690,
    "store_id": 100
  },
  "down_peers": [
    {
      "peer": {
        "id": 691,
        "store_id": 102
      },
      "down_seconds": 306
    }
  ],
  "written_bytes": 0,
  "read_bytes": 0,
  "written_keys": 0,
  "read_keys": 0,
  "approximate_size": 49,
  "approximate_keys": 966592
}
> select region_id, status, store_id, store_state_name from tikv_region_peers join tikv_store_status using (store_id) where region_id=689;
+-----------+--------+----------+------------------+
| region_id | status | store_id | store_state_name |
+-----------+--------+----------+------------------+
|       689 | NORMAL |      100 | Up               |
|       689 | NORMAL |      102 | Offline          |
|       689 | NORMAL |      101 | Up               |
+-----------+--------+----------+------------------+

4. What is your TiDB version? (Required)

  • v5.0.1
@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/diagnosis SIG: Diagnosis type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants