[MDEV-26364] Add Spider server variable for disabling GROUP BY handler Created: 2021-08-14  Updated: 2023-09-26  Resolved: 2022-01-21

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Nayuta Yanagisawa (Inactive)
Resolution: Won't Do Votes: 1
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-32238 Add a switch to disable spider group ... Closed
Relates
relates to MDEV-26361 Spider: Use GROUP BY handler only whe... Closed
relates to MDEV-26369 Add Spider status variable to count u... Open

 Description   

Add a server variable, to the Spider storage engine, that enables/disables the use of GROUP BY handler. This provides users with a unified workaround for the bugs like MDEV-26013. In the Spider docs, an execution is called "direct" if it uses GROUP BY handler (e.g., direct aggregation, direct join, ...). So, the parameter name would be spider_direct_execution spider_enable_direct_select. Or, simply naming spider_enable_group_by_handler would be OK.

The default value of the variable should be 1 (i.e., use GROUP BY handler) for compatibility.



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-14 ]

serg I would like to introduce the parameter to 10.3 and later. In principle, it might not be good to add a new parameter to the stable versions, but I expect this helps many users. I also think that the parameter should have been introduced at the same time as the GROUP BY handler.

What do you think? I would also like to get your opinion on the parameter name.

Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-14 ]

This parameter seems to be useful for testing purposes. One can specify the execution path that he want to test.

Comment by Sergei Golubchik [ 2021-08-15 ]

10.3 looks ok. spider_direct_execution sounds good too.

Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-15 ]

Thank you for your confirmation.

After I asked you a question, I noticed that there are status variables named spider_direct_update and spider_direct_delete. Thus, naming spider_direct_execution might be confusing. Maybe, spider_enable_direct_select is a better name, because it clarifies that it is a switch of direct execution, and the Spider's GROUP BY handler only supports SELECT statements.

Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-23 ]

This seems not to be "refactoring". So, I removed the epic "Spider Refactoring".

Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-24 ]

Please review https://github.com/MariaDB/server/commit/43bbe5286358d54b3f46227509969e2586e8fa4a.

Finally, I decided to name the variable spider_enable_group_by_handler. I now think that a name like spider_enable_direct_XX will lead to confusion, because the word "direct" is used in many ways in the Spider storage engine.

Comment by Sergei Golubchik [ 2022-01-10 ]

may be spider_direct_group_by ? to avoid the internal implementation name of class group_by_handler.

Generally, I don't like this change, I think it's a step in the wrong direction, instead of us fixing bugs it encourages users (and us) to simply disable the feature. I believe a feature should either be enabled and used or removed.

But as it's purely Spider patch, it's ultimately up to you to decide whether to push it or not.

Code-wise it's, of course, ok.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-01-21 ]

Thank you for your review. However, I changed my mind and will try to handle the problem in MDEV-27260. So, won't do.

Generated at Thu Feb 08 09:44:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.