[resource-control] Cancelled ALTER RESOURCE GROUP leaves the uncommitted configuration active in PD
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
> Evidence status: confirmed.
### 1. Minimal reproduce step (Required)
```sql
Create resource group ai_rg_real at RU_PER_SEC=1000 PRIORITY=LOW. Pause the DDL worker immediately after infosync.ModifyResourceGroup changes PD during ALTER to RU_PER_SEC=1 PRIORITY=HIGH. From another session run ADMIN CANCEL DDL JOBS. Release the worker and compare the DDL result, SHOW CREATE RESOURCE GROUP, INFORMATION_SCHEMA.RESOURCE_GROUPS, and DDL job history.
```
### 2. What did you expect to see? (Required)
A cancelled DDL must leave both metadata and runtime resource-manager state at 1000/LOW.
### 3. What did you see instead? (Required)
The ALTER returns ERROR 8214 and job history is cancelled; SHOW CREATE is 1000/LOW, while the PD-backed runtime view is 1/HIGH.
### 4. What is your TiDB version? (Required)
master 13282a8bd06b; non-partition ALTER RESOURCE GROUP
Likely root cause and fix direction
onAlterResourceGroup stages metadata in the worker transaction but commits the external PD ModifyResourceGroup before schema/job publication. Cancellation causes a job-row write conflict and generic rollback only marks the job cancelled; it has no PD compensation.
Contributor guide
Assessment
This issue has not been assessed yet.