Bug #110626 remove unused code for innodb simulated-aio systerm
Submitted: 6 Apr 2023 13:29 Modified: 6 Apr 2023 13:55
Reporter: alex xing (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S5 (Performance)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[6 Apr 2023 13:29] alex xing
handler.allocate_buffer and handler.copy_to_buffer is not used in simulated-aio systerm, and these functions have been obsolete for a long time. We can remove this code to make the code a little more readable 

How to repeat:
just read the code

Suggested fix:
remove the unused code just as the below patch
[6 Apr 2023 13:33] alex xing
a simple patch to describe the optimization

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: optimize.patch (text/plain), 2.33 KiB.

[6 Apr 2023 13:34] MySQL Verification Team
Hi Mr. xing,

Thank you for your bug report.

You wrote that you have sent us a patch, but it is not there .....

We are waiting eagerly on your contribution.
[6 Apr 2023 13:35] MySQL Verification Team

Also, we would be grateful if you could explain to us as to what is :

simulated-aio systerm

Thanks in advance .....
[6 Apr 2023 13:38] alex xing
simulated-AIO is a simulated asynchronous I/O model implemented earlier by InnoDB.
[6 Apr 2023 13:40] MySQL Verification Team
Hi Mr. xing,

We are still waiting on your patch .....
[6 Apr 2023 13:42] alex xing
a simple patch to describe the optimization

Attachment: optimize.patch (text/plain), 2.33 KiB.

[6 Apr 2023 13:48] MySQL Verification Team
Hi Mr. xing,

I hope that you have noted that the relevant function / methods that you would like to remove have a C++ attribute of [[no_discard]].

That means that these functions are already scheduled for removal in the next version.

Do you still think that, although the removal is scheduled, we should still verify this report ?????

Thanks very much in advance .....
[6 Apr 2023 13:52] alex xing
I know C++ attribute of [[no_discard]], and I saw that this function(handler.allocate_buffer and handler.copy_to_buffer) was deprecated at least in 2015, which is a long time ago, so I mistakenly assumed that this function would not be enabled.
[6 Apr 2023 13:55] MySQL Verification Team

Thank you for your bug report.

However, removal of the unused functions and methods has already been scheduled. It includes also the functions that you have reported, but it also has many other functions on the list.

Your objections have been noted and we thank you for this report.