Skip to content

Support batch processing with the GetRegion stream call #8690

@JmPotato

Description

@JmPotato

We have encountered several issues related to the GetRegion call and region cache updates, such as #2843 and #8426. At present, a highly feasible solution to alleviate this type of problem is to change GetRegion from a unary gRPC call to a stream call that supports batch processing, which should reduce the CPU pressure on PD in scenarios such as cache expiration and error retries strom.

  • Implement the gRPC stream version of GetRegion which supports handling various queries, such as GetPrevRegion and GetRegionByID.
  • Implement the batch processing logic within the PD client.
  • Integrate the new GetRegion method into the client-go/TiDB.
  • Conduct the benchmark tests with the previous version to evaluate the QPS/CPU usage performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/developmentThe issue belongs to a development tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions