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

Statistics are not match with PD when querying INFORMATION_SCHEMA.TIDB_HOT_REGIONS #21260

Closed
rleungx opened this issue Nov 24, 2020 · 1 comment · Fixed by #21278
Closed

Statistics are not match with PD when querying INFORMATION_SCHEMA.TIDB_HOT_REGIONS #21260

rleungx opened this issue Nov 24, 2020 · 1 comment · Fixed by #21278
Labels
severity/moderate sig/diagnosis SIG: Diagnosis type/bug The issue is confirmed as a bug.

Comments

@rleungx
Copy link
Member

rleungx commented Nov 24, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Analyze a table, and use select * from INFORMATION_SCHEMA.TIDB_HOT_REGIONS.

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

The hot regions' statistics

3. What did you see instead (Required)

Use SQL:

Screen Shot 2020-11-24 at 8 08 08 PM

Directly use pd-ctl hot read:

» hot read
{
  ...
  "as_leader": {
    "1": {
      ...
      "statistics": [
        {
          "store_id": 1,
          "region_id": 25885,
          "hot_degree": 3,
          ...
          "flow_bytes": 120523.79999999999,
          "flow_keys": 493.95,
          ...
        }
      ]
    },
    "116": {
      ...
      "statistics": [
        {
          "store_id": 116,
          "region_id": 55531,
          "hot_degree": 8,
          ...
          "flow_bytes": 39862.28333333333,
          "flow_keys": 6.491666666666666,
          ...
        }
      ]
    },
    "88": {
      ...
      "statistics": [
        {
          "store_id": 88,
          "region_id": 25947,
          "hot_degree": 3,
          ...
          "flow_bytes": 123419.26666666666,
          "flow_keys": 505.8166666666667,
          ...
        }
      ]
    }
  }
}

4. What is your TiDB version? (Required)

Release Version: v4.0.8
Edition: Community
Git Commit Hash: 66ac9fc31f1733e5eb8d11891ec1b38f9c422817
Git Branch: heads/refs/tags/v4.0.8
UTC Build Time: 2020-10-30 08:21:16
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@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