Skip to content

Remove getRegions call by lightning in physical import mode #45507

Closed
@mittalrishabh

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

When lightning runs in physical import mode, it runs this sql query

SELECT REGION_ID, APPROXIMATE_SIZE FROM information_schema.TIKV_REGION_STATUS WHERE TABLE_ID = ?

This call is made by each lightning process in parallel import mode and by multiple worker threads in a lightning process. It can potentially overload the PD if number of regions are too many. However, it appears that this call may be unnecessary since its purpose is to display a warning message and increment a counter in the SplitAndScatterRegionByRanges() function. Considering that lightning physical import always operates on a new table, splitting the new region should not pose any harm.

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

Less number of get region calls to PD

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

6.5

Metadata

Assignees

Labels

affects-5.3This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.component/lightningThis issue is related to Lightning of TiDB.severity/majortype/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