-
Notifications
You must be signed in to change notification settings - Fork 5.8k
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
tidb gc too slow after drop database with 60k tables #33069
Comments
The QPS drops about 50% when the GC worker is started: TiDB log:
|
Confirmed that this is introduced by #30842. When there are thousands of tables, thousands of HTTP requests are sent from TiDB in order to delete the placement rules... tidb/store/gcworker/gc_worker.go Lines 1918 to 1926 in 7fcdab6
|
@CalvinNeo PTAL, can we make a batch-delete API instead? |
I am trying not to request pd when the table has no TiFlash replica set by #33068.
|
The |
@fubinzh Please add the TiFlash replica information in 'Minimal reproduce step', which is important for reproducing this issue. |
@bb7133 The data I used doesn't have TiFlash replica actually, the tables in the br backup data doesn't have tiflash replicas, and the TiDB cluster restored to doesn't have TiFlash node deployed either. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
gc should be finished correctly and and tikv spaces are recycled.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
MySQL [(none)]> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.0.0-alpha
Edition: Community
Git Commit Hash: 9fcc6b0
Git Branch: heads/refs/tags/v6.0.0-alpha
UTC Build Time: 2022-03-13 14:56:23
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
The text was updated successfully, but these errors were encountered: