pingcap / pingcap/tidb

RunawayChecker cannot account for RU consumption from the non-correlated subquery

Open
#61,888 0 comments 0 reactions 0 assignees View on GitHub
affects-7.5 affects-8.1 affects-8.5 affects-9.0 component/pd severity/moderate type/bug
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

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.