You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This variable controls whether TiDB supports disk spill for the parallel HashAgg algorithm. When it is ON, the HashAgg operator can automatically trigger data spill based on memory usage under any parallel conditions, thus balancing performance and data throughput. It is not recommended to set this variable to OFF. Starting from v8.2.0, setting it to OFF will report an error. This variable will be deprecated in a future release.
How would you like to improve it?
Actually, changing tidb_enable_parallel_hashagg_spill value at session level does not raise errors. It just raises a warning. Also, changing tidb_enable_parallel_hashagg_spill` value at global level is accepted without any warnings/errors.
Steps to reproduce
Startup tiup playground v8.3.0
% tiup playground v8.3.0
Connect to the tiup playground instance
mysql --comments --host 127.0.0.1 --port 4000 -u root
Run these statements to see if changing tidb_enable_parallel_hashagg_spill value to OFF raises any errors as documented.
mysql> select @@global.tidb_enable_parallel_hashagg_spill, @@session.tidb_enable_parallel_hashagg_spill;
+---------------------------------------------+----------------------------------------------+
| @@global.tidb_enable_parallel_hashagg_spill | @@session.tidb_enable_parallel_hashagg_spill |
+---------------------------------------------+----------------------------------------------+
| 1 | 1 |
+---------------------------------------------+----------------------------------------------+
1 row in set (0.00 sec)
mysql> set tidb_enable_parallel_hashagg_spill = off;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> show warnings;
+---------+------+-----------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------------------------------------------------------------+
| Warning | 1681 | tidb_enable_parallel_hashagg_spill will be removed in the future and hash aggregate spill will be enabled by default. |
+---------+------+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select @@global.tidb_enable_parallel_hashagg_spill, @@session.tidb_enable_parallel_hashagg_spill;
+---------------------------------------------+----------------------------------------------+
| @@global.tidb_enable_parallel_hashagg_spill | @@session.tidb_enable_parallel_hashagg_spill |
+---------------------------------------------+----------------------------------------------+
| 1 | 0 |
+---------------------------------------------+----------------------------------------------+
1 row in set (0.00 sec)
mysql> set global tidb_enable_parallel_hashagg_spill = off;
Query OK, 0 rows affected (0.02 sec)
mysql> show warnings;
Empty set (0.00 sec)
mysql> select @@global.tidb_enable_parallel_hashagg_spill, @@session.tidb_enable_parallel_hashagg_spill;
+---------------------------------------------+----------------------------------------------+
| @@global.tidb_enable_parallel_hashagg_spill | @@session.tidb_enable_parallel_hashagg_spill |
+---------------------------------------------+----------------------------------------------+
| 0 | 0 |
+---------------------------------------------+----------------------------------------------+
1 row in set (0.00 sec)
mysql>
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v8.3.0
Edition: Community
Git Commit Hash: 1a0c3ac3292fff7742faa0c00a662ccb66ba40db
Git Branch: HEAD
UTC Build Time: 2024-08-20 10:23:00
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: tikv
1 row in set (0.00 sec)
mysql>
The text was updated successfully, but these errors were encountered:
Error Report
Please answer the following questions before submitting your issue. Thanks!
https://docs.pingcap.com/tidb/dev/system-variables#tidb_enable_parallel_hashagg_spill-new-in-v800
Actually, changing
tidb_enable_parallel_hashagg_spill
value at session level does not raise errors. It just raises a warning. Also, changing tidb_enable_parallel_hashagg_spill` value at global level is accepted without any warnings/errors.Steps to reproduce
tidb_enable_parallel_hashagg_spill
value toOFF
raises any errors as documented.The text was updated successfully, but these errors were encountered: