Feature Request
Describe the feature you'd like
Some deployments offload coprocessor execution to remote cop workers whose cost structure differs from local reads. With pingcap/kvproto#1500, coprocessor responses can report the factual subset of read bytes that was processed remotely (ScanDetailV2.remote_processed_versions_size / remote_total_versions_size) alongside the undiscounted totals.
The resource-group controller should be able to price that factual remote subset independently in RU v1 settlement:
- Add an optional
read-cost-per-byte-remote request-unit configuration. When omitted, default to 0.5x the normal read-byte cost; an explicit zero remains valid.
- Settle reads as
base + local_bytes * normal_rate + remote_bytes * remote_rate + CPU.
- Response adapters expose the remote subset through an optional interface, so existing adapters keep charging all bytes at the normal price. Malformed remote subsets are clamped to total bytes.
- Paging precharge and token-bucket behavior stay unchanged.
Describe alternatives you've considered
Server-side mutation of scan statistics to implement the discount (current behavior in the storage engine) conflates measurement with pricing and pollutes every downstream consumer of execution statistics.
Teachability, Documentation, Adoption, Migration Strategy
Purely additive configuration; omission preserves an equivalent default. Implemented by #11018.
Feature Request
Describe the feature you'd like
Some deployments offload coprocessor execution to remote cop workers whose cost structure differs from local reads. With pingcap/kvproto#1500, coprocessor responses can report the factual subset of read bytes that was processed remotely (
ScanDetailV2.remote_processed_versions_size/remote_total_versions_size) alongside the undiscounted totals.The resource-group controller should be able to price that factual remote subset independently in RU v1 settlement:
read-cost-per-byte-remoterequest-unit configuration. When omitted, default to 0.5x the normal read-byte cost; an explicit zero remains valid.base + local_bytes * normal_rate + remote_bytes * remote_rate + CPU.Describe alternatives you've considered
Server-side mutation of scan statistics to implement the discount (current behavior in the storage engine) conflates measurement with pricing and pollutes every downstream consumer of execution statistics.
Teachability, Documentation, Adoption, Migration Strategy
Purely additive configuration; omission preserves an equivalent default. Implemented by #11018.