Open SunRunAway opened 4 years ago
/pick-up-challenge
@ekalinin already had picked pingcap/tidb#12939, finish it before pick up a new one.
/pick-up-challenge
@ekalinin pick up issue success
Hi @ekalinin , Thank you for picking this chanllenge. Do you have any ideas or plans? Feel free to ask me anything here or on slack.
Hi @ekalinin , Thank you for picking this chanllenge. Do you have any ideas or plans? Feel free to ask me anything here or on slack.
Hi @SunRunAway
Yes, i'm working on this issue it the moment. Current plan is:
buildCopTasksChan
. It's gonna be almost the same as buildCopTasks
, except several things:
tasksCh := make(chan *copTask, 1024)
, 1024 is for example, we can think about more suitable value)splitRanges / buildTiDBMemCopTasks
will be called in backgroundsplitRanges / buildTiDBMemCopTasks
: all new instances of the copTask
will be sent into that channelbuildCopTasks
call from Send(...)
buildCopTasksChan
call during the copIterator.open()
, returned channel will be saved in copIterator.tasksCh
copIteratorTaskSender.tasks []*copTask
with copIteratorTaskSender.tasksCh chan *copTask
, copIteratorTaskSender.run
:
sender.tasksCh
instead of sender.tasks
copIterator.tasks
during iterationcopIterator.Next
:
keepOrder
branch wait until all it.tasks
are filledCurrent state: did almost all steps, except last one (copIterator.Next
). And a lot of tests are failing at the moment.
👍 Sounds great, looking forward your pull request.
@fzhedu PTAL when you're free, Thanks.
After #53850, both tiflash and tikv coprocessor load the region info in batch from PD, building all the cop tasks no more taks a long time, I think this issue can be closed.
Description
The current procedure when sending a cop request is
copIteratorWorker
copIteratorWorker
execute the taskIf we have thousands of tasks, the building step may take too long(and it may load region info from pd), it will enlarge the time of first meeting row.
We need build all cop tasks in a diffrent goroutine, and send tasks which successfully builded immediately to
copIteratorWorker
.Difficulty
Score
Mentor(s)
Recommended Skills