server
server copied to clipboard
MDEV-35740 - Make IO_SIZE compile-time configurable, convert comment to compile-time check, fix grammar
- [x] The Jira issue number for this PR is: MDEV-35740
There is no JIRA for this simple refactoring.
Description
Making mariadb's IO_SIZE compile-time configurable enables more straight-forward investigation of the performance implications of having an IO_SIZE which is different than the memory page size.
By converting the text describing the constraints of the constant to a compile-time check, this enables us to make IO_SIZE configurable.
It should be noted that this #define is duplicated in the submodule libmariadb in the include/ma_global.h file.
Release Notes
Release notes might include the ability to define IO_SIZE to be a value other than 4096.
How can this PR be tested?
First, ensure that libmariadb is patched to #ifndef guard the #define IO_SIZE ( see: https://github.com/mariadb-corporation/mariadb-connector-c/pull/265 ).
Next, add different values via cmake like -DIO_SIZE=8192 to see a larger value, or like -DIO_SIZE=4000 to see it fail with a compile-time error.
As this is a compile-time option this does not lend itself to automated testing.
Basing the PR against the correct MariaDB version
- [x] This is a new feature or a refactoring, and the PR is based against the
mainbranch.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.