Skip to content
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

Changing tidb_enable_parallel_hashagg_spill to OFF does not report errors #18871

Open
yahonda opened this issue Sep 10, 2024 · 1 comment
Open

Comments

@yahonda
Copy link
Member

yahonda commented Sep 10, 2024

Error Report

Please answer the following questions before submitting your issue. Thanks!

  1. 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.

  1. 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

  1. Startup tiup playground v8.3.0
% tiup playground v8.3.0
  1. Connect to the tiup playground instance
mysql --comments --host 127.0.0.1 --port 4000 -u root
  1. 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>
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Sep 12, 2024

@xzhangxian1008 Could you please take a look at this issue? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants