mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-26674 workaround for mariadb-backup
This is follow-up to commit 1193a793c4
.
We will set innodb_use_native_aio=OFF by default also in mariadb-backup
when running on a potentially affected kernel.
This commit is contained in:
parent
c1adc4d078
commit
3dc0d884ec
2 changed files with 21 additions and 6 deletions
|
@ -1392,6 +1392,11 @@ uint xb_client_options_count = array_elements(xb_client_options);
|
|||
static const char *dbug_option;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_URING
|
||||
extern const char *io_uring_may_be_unsafe;
|
||||
bool innodb_use_native_aio_default();
|
||||
#endif
|
||||
|
||||
struct my_option xb_server_options[] =
|
||||
{
|
||||
{"datadir", 'h', "Path to the database root.", (G_PTR*) &mysql_data_home,
|
||||
|
@ -1508,7 +1513,12 @@ struct my_option xb_server_options[] =
|
|||
"Use native AIO if supported on this platform.",
|
||||
(G_PTR*) &srv_use_native_aio,
|
||||
(G_PTR*) &srv_use_native_aio, 0, GET_BOOL, NO_ARG,
|
||||
TRUE, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_URING
|
||||
innodb_use_native_aio_default(),
|
||||
#else
|
||||
TRUE,
|
||||
#endif
|
||||
0, 0, 0, 0, 0},
|
||||
{"innodb_page_size", OPT_INNODB_PAGE_SIZE,
|
||||
"The universal page size of the database.",
|
||||
(G_PTR*) &innobase_page_size, (G_PTR*) &innobase_page_size, 0,
|
||||
|
@ -2071,8 +2081,12 @@ static bool innodb_init_param()
|
|||
msg("InnoDB: Using Linux native AIO");
|
||||
}
|
||||
#elif defined(HAVE_URING)
|
||||
|
||||
if (srv_use_native_aio) {
|
||||
if (!srv_use_native_aio) {
|
||||
} else if (io_uring_may_be_unsafe) {
|
||||
msg("InnoDB: Using liburing on this kernel %s may cause hangs;"
|
||||
" see https://jira.mariadb.org/browse/MDEV-26674",
|
||||
io_uring_may_be_unsafe);
|
||||
} else {
|
||||
msg("InnoDB: Using liburing");
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -152,7 +152,7 @@ void close_thread_tables(THD* thd);
|
|||
|
||||
#ifdef HAVE_URING
|
||||
/** The Linux kernel version if io_uring() is considered unsafe */
|
||||
static const char *io_uring_may_be_unsafe;
|
||||
const char *io_uring_may_be_unsafe;
|
||||
#endif
|
||||
|
||||
#define INSIDE_HA_INNOBASE_CC
|
||||
|
@ -19390,9 +19390,10 @@ static MYSQL_SYSVAR_STR(version, innodb_version_str,
|
|||
#ifdef HAVE_URING
|
||||
# include <sys/utsname.h>
|
||||
static utsname uname_for_io_uring;
|
||||
#else
|
||||
static
|
||||
#endif
|
||||
|
||||
static bool innodb_use_native_aio_default()
|
||||
bool innodb_use_native_aio_default()
|
||||
{
|
||||
#ifdef HAVE_URING
|
||||
utsname &u= uname_for_io_uring;
|
||||
|
|
Loading…
Reference in a new issue