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

After using BR restore the table, the stats_healthy is 100. #29769

Closed
winoros opened this issue Nov 15, 2021 · 3 comments
Closed

After using BR restore the table, the stats_healthy is 100. #29769

winoros opened this issue Nov 15, 2021 · 3 comments
Assignees
Labels
affects-8.1 report/customer Customers have encountered this bug. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@winoros
Copy link
Member

winoros commented Nov 15, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Using br to restore a table without stats.

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

The show stats_heathy tells us the table's statistics is not in a good situation so we can auto analyze it soon.

3. What did you see instead (Required)

The show stats_healthy tells us the table's healthy rate is 100%.

4. What is your TiDB version? (Required)

Current master

@winoros winoros added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/moderate labels Nov 15, 2021
@xuyifangreeneyes
Copy link
Contributor

/assign

@Rustin170506
Copy link
Member

Rustin170506 commented Apr 10, 2024

Tested locally:

  1. Backup some tables with: tiup br backup full --pd "127.0.0.1:2379" --storage "s3://qe-testing/kernel-testing/xxxx/testdata/sbtest500rustin/?access-key=xxxxx&secret-access-key=xxxx&endpoint=http%3a%2f%2fks3-cn-xxxxx-internal.ksyuncs.com&force-path-style=false&region=Beijing&provider=ks" --ignore-stats
  2. Start a new TiDB cluster: tiup playground nightly
  3. Disable the auto-analyze: set global tidb_enable_auto_analyze = 0
  4. Restore: tiup br restore db --pd "127.0.0.1:2379" --db sbtest1 --storage "s3://qe-testing/kernel-testing/xxxxxx/testdata/sbtest500rustin/?access-key=xxx&secret-access-key=xxxx&endpoint=http%3a%2f%2fks3-cn-xxxx-internal.ksyuncs.com&force-path-style=false&region=Beijing&provider=ks"
  5. Check the healthy:
MySQL [(none)]> show stats_healthy;
+---------+------------+----------------+---------+
| Db_name | Table_name | Partition_name | Healthy |
+---------+------------+----------------+---------+
| sbtest1 | sbtest10   |                |       0 |
| sbtest1 | sbtest5    |                |       0 |
| sbtest1 | sbtest3    |                |       0 |
| sbtest1 | sbtest2    |                |       0 |
| sbtest1 | sbtest7    |                |       0 |
| sbtest1 | sbtest8    |                |       0 |
| sbtest1 | sbtest6    |                |       0 |
| sbtest1 | sbtest4    |                |       0 |
| sbtest1 | sbtest1    |                |       0 |
| sbtest1 | sbtest9    |                |       0 |
+---------+------------+----------------+---------+
10 rows in set (0.02 sec)

MySQL [(none)]> show stats_meta;
+---------+------------+----------------+---------------------+--------------+-----------+-------------------+
| Db_name | Table_name | Partition_name | Update_time         | Modify_count | Row_count | Last_analyze_time |
+---------+------------+----------------+---------------------+--------------+-----------+-------------------+
| sbtest1 | sbtest10   |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest5    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest3    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest4    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest1    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest9    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest2    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest7    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest8    |                | 2024-04-10 18:19:14 |            0 |   5000000 | NULL              |
| sbtest1 | sbtest6    |                | 2024-04-10 18:19:13 |            0 |   5000000 | NULL              |
+---------+------------+----------------+---------------------+--------------+-----------+-------------------+
10 rows in set (0.00 sec)

@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.1 report/customer Customers have encountered this bug. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

6 participants