client/http: expose approximate_kv_size in RegionInfo
Open
contribution
type/enhancement
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## 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).
Contributor guide
Assessment
This issue has not been assessed yet.