Changing `tidb_enable_parallel_hashagg_spill` to `OFF` does not report errors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 617
- Forks
- 724
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 223
Description
Error Report
Please answer the following questions before submitting your issue. Thanks!
- What is the URL/path of the document related to this issue?
https://docs.pingcap.com/tidb/dev/system-variables#tidb_enable_parallel_hashagg_spill-new-in-v800
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_spillvalue toOFFraises 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>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked system-variables documentation and reproduce the session- and global-level SET statements on TiDB v8.3.0 using the commands shown. Compare the observed warning and error behavior with the documented claim; done means the documentation and actual behavior agree, with the discrepancy resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100