RunawayChecker cannot account for RU consumption from the non-correlated subquery
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
### 1. Minimal reproduce step (Required)
Assuming we have set a `QUERY_LIMIT` with RU threshold for the current resource group, and then run an SQL that meets the following conditions:
- Having at least one non-correlated subquery.
- The planner rewrites the subquery using the execution results obtained during optimization and prior to statement execution.
- The non-correlated subquery consumes a lot of RUs.
### 2. What did you expect to see? (Required)
If the total RUs consumed by its subquery exceed the `QUERY_LIMIT`, the appropriate action should be taken.
### 3. What did you see instead (Required)
No action is taken even when the RUs exceed the limit during the execution of subquery.
### 4. What is your TiDB version? (Required)
https://github.com/pingcap/tidb/commit/c597cb5e0a290153916d52a5600c7ee4b30c634a
Contributor guide
Assessment
This issue has not been assessed yet.