Skip to content

The timeout is too short for fetching data of INFORMATION_SCHEMA.TIFLASH_TABLES #57816

@JaySon-Huang

Description

@JaySon-Huang

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

An issue reported in the asktug (https://asktug.com/t/topic/1036157/1)

mysql> select * from INFORMATION_SCHEMA.TIFLASH_TABLES  limit 1\G
ERROR 1105 (HY000): rpc error: code = DeadlineExceeded desc = context deadline exceeded

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

3. What did you see instead (Required)

The timeout is only 1 second for fetching the system table from tiflash instance. When there are thousand of table with tiflash replica, the query easily run into timeout.

https://github.com/pingcap/tidb/blob/v7.5.4/pkg/executor/infoschema_reader.go#L3081-L3083

Timeout is 1 second since #42720

There are about 5000 tables/partition in the cluster.

mysql> select count(*) from INFORMATION_SCHEMA.TIFLASH_REPLICA;
+----------+
| count(*) |
+----------+
|     3090 |
+----------+
1 row in set (0.04 sec)

mysql> select count(*) from INFORMATION_SCHEMA.TIFLASH_REPLICA t join INFORMATION_SCHEMA.partitions p on t.table_schema = p.table_schema and t.table_name= p.table_name;
+----------+
| count(*) |
+----------+
|     4892 |
+----------+
1 row in set (0.30 sec)

4. What is your TiDB version? (Required)

v7.5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/tiflashreport/communityThe community has encountered this bug.severity/moderatetype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions