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

Control the max number of row and bytes lighting sends to tidb #46607

Closed
guoshouyan opened this issue Sep 2, 2023 · 2 comments · Fixed by #46997
Closed

Control the max number of row and bytes lighting sends to tidb #46607

guoshouyan opened this issue Sep 2, 2023 · 2 comments · Fixed by #46997
Labels
component/lightning This issue is related to Lightning of TiDB. type/feature-request This is a feature requests on the product

Comments

@guoshouyan
Copy link

Feature Request

Is your feature request related to a problem? Please describe:

In lightning physical backend, we can set the store-write-bwlimit to control how much data lightning send to tikv.
Can we have similar feature in logical mode?
We already have minDeliverBytes here but it's not configurable.
Can we make it configurable and also have another config like minDeliverRows to control the rows it sends?

Describe the feature you'd like:

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@guoshouyan guoshouyan added the type/feature-request This is a feature requests on the product label Sep 2, 2023
@lance6716
Copy link
Contributor

Hi, not sure if I understand it correctly. In logical backend lightning will try to send data every 1MB. (be.MaxChunkSize() always return 1MB)

for _, r := range rows.SplitIntoChunks(be.MaxChunkSize()) {
for i := 0; i < writeRowsMaxRetryTimes; i++ {
// Write in the batch mode first.
err = be.WriteBatchRowsToDB(ctx, tableName, columnNames, r)

with the concurrency of lightning.region-concurrency from the configuration file. I think you want to make 1MB configurable?

And can you explain why the default value is not good enough?

@kennytm kennytm added the component/lightning This issue is related to Lightning of TiDB. label Sep 14, 2023
ti-chi-bot bot pushed a commit that referenced this issue Feb 18, 2024
@D3Hunter
Copy link
Contributor

Hi, not sure if I understand it correctly. In logical backend lightning will try to send data every 1MB. (be.MaxChunkSize() always return 1MB)

for _, r := range rows.SplitIntoChunks(be.MaxChunkSize()) {
for i := 0; i < writeRowsMaxRetryTimes; i++ {
// Write in the batch mode first.
err = be.WriteBatchRowsToDB(ctx, tableName, columnNames, r)

with the concurrency of lightning.region-concurrency from the configuration file. I think you want to make 1MB configurable?

And can you explain why the default value is not good enough?

this 1M is useless, as deliverLoop send in 96K batch, see #46997 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/lightning This issue is related to Lightning of TiDB. type/feature-request This is a feature requests on the product
Projects
None yet
4 participants