-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2affects-6.3affects-6.4affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-6.6affects-7.0affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.2severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tmp-storage-quota didn't work at all!!!!
- change tidb config, set
- tmp-storage-quota = 100
- tmp-storage-path = "/tmp/gjt_tidb_tmp_storage"
- run following sql: will load 3k.txt
drop table t1, t2;
create table t1(c1 int, c2 int);
create table t2(c1 int, c2 int);
load data local infile '/home/guojiangtao/tmp/3k.txt' into table t1 fields terminated by ' ';
load data local infile '/home/guojiangtao/tmp/3k.txt' into table t2 fields terminated by ' ';
set global tidb_mem_oom_action = 'log';
set @@tidb_mem_quota_query = 100;
explain analyze select count(1) from t1 alias1 inner join t2 alias2;
2. What did you expect to see? (Required)
ERROR 1105 (HY000): Out Of Global Storage Quota!
3. What did you see instead (Required)
runs ok, disk usage is 70.3 KB
MySQL [test]> explain analyze select count(1) from t1 alias1 inner join t2 alias2;
+-------------------------------+--------------+---------+-----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------+---------+
| id | estRows | actRows | task | access object | execution info | operator info | memory | disk |
+-------------------------------+--------------+---------+-----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------+---------+
| HashAgg_8 | 1.00 | 1 | root | | time:6.65s, loops:2, RU:6.857900, partial_worker:{wall_time:6.651762678s, concurrency:5, task_num:8790, tot_wait:32.685925103s, tot_exec:571.040105ms, tot_time:33.258139394s, max:6.651692781s, p95:6.651692781s}, final_worker:{wall_time:6.651800768s, concurrency:5, task_num:5, tot_wait:33.258428098s, tot_exec:20.237µs, tot_time:33.258452092s, max:6.651697321s, p95:6.651697321s} | funcs:count(1)->Column#7 | 165.3 KB | N/A |
| └─HashJoin_10 | 100000000.00 | 9000000 | root | | time:6.64s, loops:8791, build_hash_table:{total:6.61ms, fetch:4.22ms, build:2.39ms}, probe:{concurrency:5, total:19.4s, max:6.65s, probe:19.4s, fetch:34ms} | CARTESIAN inner join | 63.2 KB | 70.3 KB |
| ├─TableReader_15(Build) | 10000.00 | 3000 | root | | time:5.58ms, loops:4, cop_task: {num: 5, max: 1.78ms, min: 698.4µs, avg: 1.14ms, p95: 1.78ms, tot_proc: 2ms, rpc_num: 5, rpc_time: 5.49ms, copr_cache_hit_ratio: 0.00, build_task_duration: 7.61µs, max_distsql_concurrency: 1} | data:TableFullScan_14 | 16.7 KB | N/A |
| │ └─TableFullScan_14 | 10000.00 | 3000 | cop[tikv] | table:alias2 | tikv_task:{proc max:1.67ms, min:543.7µs, avg: 1.03ms, p80:1.67ms, p95:1.67ms, iters:0, tasks:5} | keep order:false, stats:pseudo | N/A | N/A |
| └─TableReader_13(Probe) | 10000.00 | 3000 | root | | time:4.25ms, loops:4, cop_task: {num: 5, max: 1.69ms, min: 675.9µs, avg: 1.15ms, p95: 1.69ms, tot_proc: 2ms, rpc_num: 5, rpc_time: 5.53ms, copr_cache_hit_ratio: 0.00, build_task_duration: 18.9µs, max_distsql_concurrency: 1} | data:TableFullScan_12 | 16.7 KB | N/A |
| └─TableFullScan_12 | 10000.00 | 3000 | cop[tikv] | table:alias1 | tikv_task:{proc max:1.59ms, min:518.4µs, avg: 1.03ms, p80:1.59ms, p95:1.59ms, iters:0, tasks:5} | keep order:false, stats:pseudo | N/A | N/A |
+-------------------------------+--------------+---------+-----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------+---------+
6 rows in set (6.655 sec)
4. What is your TiDB version? (Required)
MySQL [test]> select tidb_version();
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.3.0-alpha-94-gc44ba1c1a8
Edition: Community
Git Commit Hash: c44ba1c1a868220764d9f11274b683d1aaecacb6
Git Branch: master
UTC Build Time: 2023-07-05 03:47:45
GoVersion: go1.20.1
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)
Metadata
Metadata
Assignees
Labels
affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2affects-6.3affects-6.4affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-6.6affects-7.0affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.2severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.