mariadb/mysql-test/lib/My
Marko Mäkelä 24648768b4 MDEV-30136: Deprecate innodb_flush_method
We introduce the following settable Boolean global variables:

innodb_log_file_write_through: Whether writes to ib_logfile0 are
write-through (disabling any caching, as in O_SYNC or O_DSYNC).

innodb_data_file_write_through: Whether writes to any InnoDB data files
(including the temporary tablespace) are write-through.

innodb_data_file_buffering: Whether the file system cache is enabled
for InnoDB data files.

All these parameters are OFF by default, that is, the file system cache
will be disabled, but any hardware caching is enabled, that is,
explicit calls to fsync(), fdatasync() or similar functions are needed.

On systems that support FUA it may make sense to enable write-through,
to avoid extra system calls.

If the deprecated read-only start-up parameter is set to one of the
following values, then the values of the 4 Boolean flags (the above 3
plus innodb_log_file_buffering) will be set as follows:

O_DSYNC:
innodb_log_file_write_through=ON, innodb_data_file_write_through=ON,
innodb_data_file_buffering=OFF, and
(if supported) innodb_log_file_buffering=OFF.

fsync, littlesync, nosync, or (Microsoft Windows specific) normal:
innodb_log_file_write_through=OFF, innodb_data_file_write_through=OFF,
and innodb_data_file_buffering=ON.

Note: fsync() or fdatasync() will only be disabled if the separate
parameter debug_no_sync (in the code, my_disable_sync) is set.

In mariadb-backup, the parameter innodb_flush_method will be ignored.

The Boolean parameters can be modified by SET GLOBAL while the
server is running. This will require reopening the ib_logfile0
or all currently open InnoDB data files.

We will open files straight in O_DSYNC or O_SYNC mode when applicable.
Data files we will try to open straight in O_DIRECT mode when the
page size is at least 4096 bytes. For atomically creating data files,
we will invoke os_file_set_nocache() to enable O_DIRECT afterwards,
because O_DIRECT is not supported on some file systems. We will also
continue to invoke os_file_set_nocache() on ib_logfile0 when
innodb_log_file_buffering=OFF can be fulfilled.

For reopening the ib_logfile0, we use the same logic that was developed
for online log resizing and reused for updates of
innodb_log_file_buffering.

Reopening all data files is implemented in the new function
fil_space_t::reopen_all().

Reviewed by: Vladislav Vaintroub
Tested by: Matthias Leich
2023-01-11 17:55:56 +02:00
..
File
SafeProcess Merge branch '10.3' into bb-10.4-release 2022-08-10 12:21:08 +02:00
Config.pm
ConfigFactory.pm Give a readable error in mtr if resolve_at_variable fails 2021-05-19 22:54:11 +02:00
CoreDump.pm MDEV-30242 MTR fails to report stack traces of all threads by default 2022-12-16 09:59:09 +02:00
Debugger.pm MDEV-30136: Deprecate innodb_flush_method 2023-01-11 17:55:56 +02:00
Find.pm MDEV-19129: Xcode compatibility update: mysql-test-run.pl: rename $opt_vs_config to $multiconfig to use with other cmake multiconfig generators 2021-10-21 16:48:00 +03:00
Handles.pm
Options.pm mtr failed to detect when a combination is forced 2022-01-14 22:16:39 +01:00
Platform.pm MDEV-25894: support AIX as a platform in mtr 2021-07-02 17:17:19 +10:00
SafeProcess.pm Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
Suite.pm
SysInfo.pm
Tee.pm MDEV-22176 Add JUnit support to MTR to generate XML test result 2020-04-07 09:27:51 +00:00
Test.pm