Skip to content

client/http: expose approximate_kv_size in RegionInfo #10567

@D3Hunter

Description

@D3Hunter

Enhancement Task

PD HTTP API region info includes approximate_kv_size, but client/http.RegionInfo currently drops this field during JSON decode.

This blocks downstream TiDB code paths that need to read region approximate kv size via the PD HTTP client.

Proposed change:

  • Add ApproximateKvSize int64 json:"approximate_kv_size"`` to client/http.RegionInfo
  • Add JSON decode tests for both present and missing field values (missing should fallback to zero value).

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributionThis PR is from a community contributor.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