Skip to content

Push down optimisation of TIKV_REGION_STATUS and TiKV_REGION_PEERS #28330

@IcePigZDB

Description

@IcePigZDB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions