-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Code inspection.
In ddl.Ctx.writePhysicalTableRecord
for each batch of kvRanges it starts over and calls splitTableRanges again (meaning it requests information of all ranges that would match a full table, from startKey of current batch.
This results in waste of resources, it should either do the query once before the loop, or limit the query to max batchsize + 1 ranges (since the last range is needed later to see if there are any remaining range left to do).
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
Current master, as of 00791e7.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.