-
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
Remove getRegions call by lightning in physical import mode #45507
Comments
It is a bug in this version since we have #39605 . |
@niubell Please take a look, thanks |
Yes, seems the correct behaviour is tidb/br/pkg/lightning/backend/local/localhelper.go Lines 343 to 364 in 9e20208
But since we don't have a |
hi @niubell any update on this issue? thanks |
I am going to create a PR for this issue. I have tested it internally. |
@mittalrishabh thanks! |
filed PR #46202 |
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
The text was updated successfully, but these errors were encountered: