tikv / tikv/pd

scheduling: preserve region heartbeat parity for cpu stats and bucket metadata

Open
#10,608 0 comments 0 reactions 0 assignees View on GitHub
component/mcs severity/moderate type/bug
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Bug Report

### What did you do?

Deploy the scheduling service independently and let PD forward region heartbeats to it through `schedulingpb.RegionHeartbeatRequest`.

The incoming TiKV heartbeat can carry both CPU information (`cpu_usage` / `cpu_stats`) and bucket metadata. In the monolithic PD path these fields are available when PD builds `RegionInfo`, but in the scheduling microservice path the forwarded heartbeat is not fully aligned with the PD heartbeat payload.

### What did you expect to see?

The scheduling service should receive the same region heartbeat information as the monolithic PD path, so its region view and downstream scheduling logic stay consistent across deployment modes.

### What did you see instead?

There is a parity gap in the scheduling microservice heartbeat path:

- `cpu_usage` / `cpu_stats` are not present in `schedulingpb.RegionHeartbeatRequest`, so region CPU information is lost after PD forwards the heartbeat to the scheduling service.
- `bucket_meta` is not forwarded in the current PD -> scheduling heartbeat path, so the scheduling service cannot observe the region's bucket metadata even though the monolithic PD path can.

As a result, the scheduling microservice can build a region view that is missing fields already available in the non-microservice deployment mode.

### What version of PD are you using (`pd-server -V`)?

current master (observed on April 21, 2026)

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.