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

Push down optimisation of TIKV_REGION_STATUS and TiKV_REGION_PEERS #28330

Open
2 of 5 tasks
IcePigZDB opened this issue Sep 25, 2021 · 1 comment
Open
2 of 5 tasks

Push down optimisation of TIKV_REGION_STATUS and TiKV_REGION_PEERS #28330

IcePigZDB opened this issue Sep 25, 2021 · 1 comment
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@IcePigZDB
Copy link
Contributor

IcePigZDB commented Sep 25, 2021

second phase of

There used to be a proposal pr, close it because of the change is samll and move core info to this issue, new info will be update in this issue.

Description

The existing implementation of TIKV_REGION_STATUS and TIKV_REGION_PEERS fetches all tables' regions infomation, which results in the same overhead of fetching a small table's regions infomation as a large one. To avoid this, some of the predicates can be pushed down to reduce unnecessary data transfer overhead.

  1. tikv_region_status:
    The optimization idea is to add TikvRegionStatusExtractor to push down DB_NAME , TABLE_NAME, INDEX_NAME, TABLE_ID, INDEX_ID and add tikvRegionStatusRetriever to fetch regions information by region range keys, which construct start key and end key pairs from pushed down predicates.

    Task list:
    TiDB:

    PD:
    We need to support endKey in ScanRegions http interface.

  2. tikv_region_peers :
    The optimization idea is to add TikvRegionPeersExtractor to push down STORE_ID and REGION_ID and add tikvRegionPeersRetriever to fetch regions information from PD.

    Task list:
    TiDB:

    PD: None

@IcePigZDB
Copy link
Contributor Author

@nolouch, @qidi1 PTAL.

IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Oct 25, 2021
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/pd that referenced this issue Oct 25, 2021
Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/tidb that referenced this issue Nov 29, 2021
…e_reader.go

ref pingcap#28330

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
qidi1 added a commit to IcePigZDB/tidb that referenced this issue Dec 12, 2021
ref: pingcap#28330

Signed-off-by: qidi1 <1083369179@qq.com>
IcePigZDB added a commit to IcePigZDB/tidb that referenced this issue Dec 13, 2021
ref: pingcap#28330

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
IcePigZDB added a commit to IcePigZDB/tidb that referenced this issue Dec 13, 2021
ref: pingcap#28330

Signed-off-by: IcePigZDB <icepigzdb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant