mariadb/extra/mariabackup
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
..
quicklz
backup_copy.cc Merge 10.9 into 10.10 2023-01-10 15:06:25 +02:00
backup_copy.h revert mariabackup part of MDEV-27524, fix the test 2022-08-01 15:53:13 +02:00
backup_debug.h MDEV-25312 Replace fil_space_t::name with fil_space_t::name() 2021-04-07 18:01:13 +03:00
backup_mysql.cc Merge 10.10 into 10.11 2023-01-11 11:13:56 +02:00
backup_mysql.h Merge branch '10.9' into 10.10 2022-08-09 09:47:16 +02:00
backup_wsrep.h
changed_page_bitmap.cc Merge 10.7 into 10.8 2022-11-30 12:12:07 +02:00
changed_page_bitmap.h MDEV-14425 Improve the redo log for concurrency 2022-01-21 16:03:47 +02:00
CMakeLists.txt MDEV-14425 Improve the redo log for concurrency 2022-01-21 16:03:47 +02:00
common.h Merge branch '10.6' into 10.7 2022-08-08 17:12:32 +02:00
datasink.cc Merge 10.2 into 10.3 2021-09-22 18:01:41 +03:00
datasink.h MDEV-26573 : A static analyzer warning about ds_archive.cc 2021-09-15 14:19:24 +02:00
ds_buffer.cc Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
ds_buffer.h
ds_compress.cc Merge 10.4 into 10.5 2022-08-22 13:38:40 +03:00
ds_compress.h
ds_local.cc MDEV-26195: Use a 32-bit data type for some tablespace fields 2021-07-22 11:22:47 +03:00
ds_local.h
ds_stdout.cc MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
ds_stdout.h
ds_tmpfile.cc Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
ds_tmpfile.h
ds_xbstream.cc Merge 10.4 into 10.5 2021-09-24 08:42:23 +03:00
ds_xbstream.h
fil_cur.cc MDEV-30136: Deprecate innodb_flush_method 2023-01-11 17:55:56 +02:00
fil_cur.h Merge 10.6 into 10.7 2023-01-10 13:58:03 +02:00
innobackupex.cc MDEV-19246 Change database and table used for Mariabackup's history 2022-09-12 14:23:38 +04:00
innobackupex.h
read_filt.cc
read_filt.h MDEV-26195: Use a 32-bit data type for some tablespace fields 2021-07-22 11:22:47 +03:00
write_filt.cc MDEV-19229 Allow innodb_undo_tablespaces to be changed after database creation 2022-10-25 11:19:36 +05:30
write_filt.h MDEV-22929 MariaBackup option to report and/or continue when corruption is encountered 2020-12-01 08:08:57 +03:00
wsrep.cc
xb_plugin.cc MDEV-14425 Improve the redo log for concurrency 2022-01-21 16:03:47 +02:00
xb_plugin.h mariabackup: rename encryption_plugin -> xb_plugin 2021-10-27 15:55:14 +02:00
xb_regex.h MDEV-14024 PCRE2. 2019-12-21 10:34:02 +01:00
xbcloud.cc
xbstream.cc Merge 10.4 into 10.5 2021-11-29 11:16:20 +02:00
xbstream.h
xbstream_read.cc MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
xbstream_write.cc MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
xtrabackup.cc MDEV-30136: Deprecate innodb_flush_method 2023-01-11 17:55:56 +02:00
xtrabackup.h MDEV-19246 Change database and table used for Mariabackup's history 2022-09-12 14:23:38 +04:00