-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max_execution_time doesn't take affect when build cop requests takes too much time #55957
Labels
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
report/customer
Customers have encountered this bug.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
/report customer |
/type bug |
/remove-type enhancement |
/label affects-7.5 |
/label affects-8.1 |
13 tasks
/label affects-7.1 |
/remove-label affects-7.1 |
Already fixed by linked PRs |
This was referenced Sep 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
report/customer
Customers have encountered this bug.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Enhancement
The following query sets max_execution_time to 2s, but it actually takes 18.8s. It's checked that the build_task_duration takes most of the time, due to too many region reloading. This issue aims to add "max_execution_time check point" in build task process.
mysql> explain analyze SELECT
/*+ MAX_EXECUTION_TIME(2000) */
*
FROM
Name0
FORCE INDEX (PRIMARY)WHERE
Name0.o_id >= ?
AND Name0.m_id = ?
AND ((Name0.o_id > ?))
ORDER BY
Name0.o_id
LIMIT
50;
| id | estRows | estCost | actRows | task | access object | execution info | operator info | memory | disk |
| Limit_11 | 50.00 | 1416150.54 | 50 | root | | time:980.5µs, loops:2 | offset:0, count:50 | N/A | N/A |
| └─TableReader_20 | 50.00 | 1416150.54 | 50 | root | | time:977.4µs, loops:1, cop_task: {num: 1, max: 928.1µs, proc_keys: 96, tot_proc: 418.5µs, tot_wait: 24.1µs, rpc_num: 1, rpc_time: 906.1µs, copr_cache_hit_ratio: 0.00, build_task_duration: 18.8s, max_distsql_concurrency: 2} | data:Limit_19 | 113.7 KB | N/A |
| └─Limit_19 | 50.00 | 21135338.17 | 50 | cop[tikv] | | tikv_task:{time:0s, loops:2}, scan_detail: {total_process_keys: 96, total_process_keys_size: 75762, total_keys: 147, get_snapshot_time: 3.07µs, rocksdb: {delete_skipped_count: 69, key_skipped_count: 310, block: {cache_hit_count: 19, read_count: 2, read_byte: 47.6 KB, read_time: 16.2µs}}} | offset:0, count:50 | N/A | N/A |
| └─Selection_18 | 50.00 | 21135338.17 | 96 | cop[tikv] | | tikv_task:{time:0s, loops:2} | eq(DB.Name0.m_id, ?) | N/A | N/A |
| └─TableRangeScan_17 | 50000.00 | 18640338.17 | 96 | cop[tikv] | table:Name0 | tikv_task:{time:0s, loops:2} | range:(?,+inf], keep order:true, stats:pseudo | N/A | N/A |
The text was updated successfully, but these errors were encountered: