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

Lost metric for AutoID allocation when auto_id_cache set to 1 #40322

Closed
benmaoer opened this issue Jan 4, 2023 · 0 comments · Fixed by #41506
Closed

Lost metric for AutoID allocation when auto_id_cache set to 1 #40322

benmaoer opened this issue Jan 4, 2023 · 0 comments · Fixed by #41506
Assignees
Labels

Comments

@benmaoer
Copy link

benmaoer commented Jan 4, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use tiup playground to start an cluster, create a db and a table:

mysql> create database sbtest;
Query OK, 0 rows affected (0.19 sec)

mysql> CREATE TABLE sbtest1 (
    ->   id int(11) NOT NULL AUTO_INCREMENT,
    ->   k int(11) NOT NULL DEFAULT '0',
    ->   c char(120) NOT NULL DEFAULT '',
    ->   pad char(60) NOT NULL DEFAULT '',
    ->   PRIMARY KEY (id) /*T![clustered_index] CLUSTERED */,
    ->   KEY k_1 (k)
    -> ) auto_id_cache = 1;
Query OK, 0 rows affected (0.15 sec)

use sysbench to do a test:

sysbench oltp_insert run --mysql-host=[127.0.0.1](http://127.0.0.1/) --mysql-port=4000 --mysql-user=root  --db-driver=mysql --mysql-db=sbtest --threads=50 --time=1200 --report-interval=10 --tables=1 --table-size=10000000 --mysql-password=

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

Could find AutoID allocation metrics on dashboard.

3. What did you see instead (Required)

The metrics of AutoID is empty.

image

4. What is your TiDB version? (Required)

mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v6.5.0
Edition: Community
Git Commit Hash: 706c3fa3c526cdba5b3e9f066b1a568fb96c56e3
Git Branch: heads/refs/tags/v6.5.0
UTC Build Time: 2022-12-27 03:42:38
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv
1 row in set (0.00 sec)

@benmaoer benmaoer added the type/bug This issue is a bug. label Jan 4, 2023
@tiancaiamao tiancaiamao self-assigned this Jan 4, 2023
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Jan 5, 2023
@tangenta tangenta added severity/moderate and removed severity/major may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants