tikv / tikv/pd

client/http: expose approximate_kv_size in RegionInfo

Open
#10,567 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.