Skip to content

Commit e00d77c

Browse files
committed
MDEV-28772 Mariabackup locks database for minutes since 10.8.3
mariadb-backup: Add the Boolean option --innodb-log-file-buffering (default ON) to control whether the server's ib_logfile0 should be accessed via the file system cache during --backup. We may be retrying reads of the last log block very frequently, which may cause I/O stalls when the file system cache is being bypassed. This addresses a regression that was introduced in commit 4c0cd95 (MDEV-28766). On some affected systems, it may make sense to additionally SET GLOBAL innodb_log_file_buffering=OFF on the server for the duration of making a backup.
1 parent f3fddc1 commit e00d77c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,8 +1015,10 @@ enum options_xtrabackup
10151015
OPT_INNODB_BUFFER_POOL_FILENAME,
10161016
OPT_INNODB_LOCK_WAIT_TIMEOUT,
10171017
OPT_INNODB_LOG_BUFFER_SIZE,
1018+
#if defined __linux__ || defined _WIN32
1019+
OPT_INNODB_LOG_FILE_BUFFERING,
1020+
#endif
10181021
OPT_INNODB_LOG_FILE_SIZE,
1019-
OPT_INNODB_LOG_FILES_IN_GROUP,
10201022
OPT_INNODB_OPEN_FILES,
10211023
OPT_XTRA_DEBUG_SYNC,
10221024
OPT_INNODB_CHECKSUM_ALGORITHM,
@@ -1577,6 +1579,13 @@ struct my_option xb_server_options[] =
15771579
(G_PTR*) &log_sys.buf_size, (G_PTR*) &log_sys.buf_size, 0,
15781580
IF_WIN(GET_ULL,GET_ULONG), REQUIRED_ARG, 2U << 20,
15791581
2U << 20, SIZE_T_MAX, 0, 4096, 0},
1582+
#if defined __linux__ || defined _WIN32
1583+
{"innodb_log_file_buffering", OPT_INNODB_LOG_FILE_BUFFERING,
1584+
"Whether the file system cache for ib_logfile0 is enabled during --backup",
1585+
(G_PTR*) &log_sys.log_buffered,
1586+
(G_PTR*) &log_sys.log_buffered, 0, GET_BOOL, NO_ARG,
1587+
TRUE, 0, 0, 0, 0, 0},
1588+
#endif
15801589
{"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE,
15811590
"Ignored for mysqld option compatibility",
15821591
(G_PTR*) &srv_log_file_size, (G_PTR*) &srv_log_file_size, 0,
@@ -1894,10 +1903,6 @@ xb_get_one_option(const struct my_option *opt,
18941903
ADD_PRINT_PARAM_OPT(srv_log_group_home_dir);
18951904
break;
18961905

1897-
case OPT_INNODB_LOG_FILES_IN_GROUP:
1898-
case OPT_INNODB_LOG_FILE_SIZE:
1899-
break;
1900-
19011906
case OPT_INNODB_FLUSH_METHOD:
19021907
ut_a(srv_file_flush_method
19031908
<= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC));

0 commit comments

Comments
 (0)