*: support paging protocol on unistore#35244
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/827ef7b9b3182a8cfb4214c9becfdec070eb93e5 |
|
/run-unit-test |
5b8381c to
b2221dc
Compare
|
/run-unit-test |
|
/run-unit-test |
|
/run-unit-test |
1 similar comment
|
/run-unit-test |
|
@tiancaiamao: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
store/copr/coprocessor.go
Outdated
There was a problem hiding this comment.
It seems that ReqTypeAnalyze will not use paging. We do not need to set enable_paging = false for the analyze tests.
There was a problem hiding this comment.
paging is a property of the kv request,
kv request can be one of the following kinds:
// ReqTypes.
const (
ReqTypeSelect = 101
ReqTypeIndex = 102
ReqTypeDAG = 103
ReqTypeAnalyze = 104
ReqTypeChecksum = 105
ReqSubTypeBasic = 0
ReqSubTypeDesc = 10000
ReqSubTypeGroupBy = 10001
ReqSubTypeTopN = 10002
ReqSubTypeSignature = 10003
ReqSubTypeAnalyzeIdx = 10004
ReqSubTypeAnalyzeCol = 10005
)
As you can see, there are ReqTypeDAG and ReqTypeAnalyze, and also ReqTypeChecksum for admin check table ... for now, we just support ReqTypeDAG, so all other cases req.Paging = false is set.
A possible change is that we can move the paging property to coprocessor.Request.
That change would make it clear that paging is a property of ReqTypeDAG (or coprocessor.Request to be more specific), not a property kv.Request.
The drawback of the change is, if one day, we need paging protocol also for Analyze/Checksum, we need to add the property to kv.Request...
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: eae342b |
TiDB MergeCI notify✅ Well Done! New fixed [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: close #35243 #35242
Problem Summary:
I'm try to support coprocessor paging protocol on unistore, and found those issues:
admin check table/indexanalyzeare not using DAG so they don't support pagingINFORMATION_SCHEMA.CLUSTER_XXXtable use coprocessor request to query tidb instances, and tidb coprocessor doesn't support pagingWhat is changed and how it works?
You can ignore all the xxx_test.go files and just review cop_handler.go / mpp_exec.go
The actual changes are there.
In brief, I update the paging in tablescan and indexscan's
next()function to keep the paging key range update to date.And in the out most loop, check if the chunk pages are enough to break the
next()looping.Check List
Tests
I make session variable
tidb_enable_pagingdefault value toOnand run all the unit tests to check everything go work well.Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.