summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-14 15:27:03 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-14 15:27:03 +0200
commitf24b7383188b920e74aa697003edfb29d8f01ede (patch)
tree743b06ce425a2b60b16176609815320d76bec188 /extra
parent17d3f8560bf6680074924d0ca2cf42d4706ea741 (diff)
downloadmariadb-git-f24b7383188b920e74aa697003edfb29d8f01ede.tar.gz
MDEV-24313 (2 of 2): Silently ignored innodb_use_native_aio=1bb-10.5-MDEV-24313
In commit 5e62b6a5e06eb02cbde1e34e95e26f42d87fce02 (MDEV-16264) the logic of os_aio_init() was changed so that it will never fail, but instead automatically disable innodb_use_native_aio (which is enabled by default) if the io_setup() system call would fail due to resource limits being exceeded. This is questionable, especially because falling back to simulated AIO may lead to significantly reduced performance. srv_n_file_io_threads, srv_n_read_io_threads, srv_n_write_io_threads: Change the data type from ulong to uint. os_aio_init(): Remove the parameters, and actually return an error code. thread_pool::configure_aio(): Do not silently fall back to simulated AIO. Reviewed by: Vladislav Vaintroub
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 94b10019e1d..3fef49e787a 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -2128,9 +2128,9 @@ static bool innodb_init_param()
srv_buf_pool_size = (ulint) xtrabackup_use_memory;
srv_buf_pool_chunk_unit = (ulong)srv_buf_pool_size;
- srv_n_file_io_threads = (ulint) innobase_file_io_threads;
- srv_n_read_io_threads = innobase_read_io_threads;
- srv_n_write_io_threads = innobase_write_io_threads;
+ srv_n_file_io_threads = (uint) innobase_file_io_threads;
+ srv_n_read_io_threads = (uint) innobase_read_io_threads;
+ srv_n_write_io_threads = (uint) innobase_write_io_threads;
srv_max_n_open_files = ULINT_UNDEFINED - 5;
@@ -4273,8 +4273,10 @@ fail:
xb_fil_io_init();
srv_n_file_io_threads = srv_n_read_io_threads;
- os_aio_init(srv_n_read_io_threads, srv_n_write_io_threads,
- SRV_MAX_N_PENDING_SYNC_IOS);
+ if (os_aio_init()) {
+ msg("Error: cannot initialize AIO subsystem");
+ goto fail;
+ }
log_sys.create();
log_sys.log.create();