mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-10918 Innodb/Linux - Fallback to simulated aio if io_setup() fails, e.g due to insufficient resources
This commit is contained in:
@@ -4396,9 +4396,8 @@ sub extract_warning_lines ($$) {
|
|||||||
qr|Aborted connection|,
|
qr|Aborted connection|,
|
||||||
qr|table.*is full|,
|
qr|table.*is full|,
|
||||||
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
|
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
|
||||||
qr|Error: io_setup\(\) failed|,
|
qr|InnoDB: io_setup\(\) attempt|,
|
||||||
qr|Warning: io_setup\(\) failed|,
|
qr|InnoDB: io_setup\(\) failed with EAGAIN|,
|
||||||
qr|Warning: io_setup\(\) attempt|,
|
|
||||||
qr|setrlimit could not change the size of core files to 'infinity';|,
|
qr|setrlimit could not change the size of core files to 'infinity';|,
|
||||||
qr|feedback plugin: failed to retrieve the MAC address|,
|
qr|feedback plugin: failed to retrieve the MAC address|,
|
||||||
qr|Plugin 'FEEDBACK' init function returned error|,
|
qr|Plugin 'FEEDBACK' init function returned error|,
|
||||||
|
@@ -6560,12 +6560,25 @@ AIO::init_linux_native_aio()
|
|||||||
|
|
||||||
if (!linux_create_io_ctx(max_events, ctx)) {
|
if (!linux_create_io_ctx(max_events, ctx)) {
|
||||||
/* If something bad happened during aio setup
|
/* If something bad happened during aio setup
|
||||||
we should call it a day and return right away.
|
we disable linux native aio.
|
||||||
We don't care about any leaks because a failure
|
The disadvantage will be a small memory leak
|
||||||
to initialize the io subsystem means that the
|
at shutdown but that's ok compared to a crash
|
||||||
server (or atleast the innodb storage engine)
|
or a not working server.
|
||||||
is not going to startup. */
|
This frequently happens when running the test suite
|
||||||
return(DB_IO_ERROR);
|
with many threads on a system with low fs.aio-max-nr!
|
||||||
|
*/
|
||||||
|
|
||||||
|
ib::warn()
|
||||||
|
<< "Warning: Linux Native AIO disabled "
|
||||||
|
<< "because _linux_create_io_ctx() "
|
||||||
|
<< "failed. To get rid of this warning you can "
|
||||||
|
<< "try increasing system "
|
||||||
|
<< "fs.aio-max-nr to 1048576 or larger or "
|
||||||
|
<< "setting innodb_use_native_aio = 0 in my.cnf";
|
||||||
|
ut_free(m_aio_ctx);
|
||||||
|
m_aio_ctx = 0;
|
||||||
|
srv_use_native_aio = FALSE;
|
||||||
|
return(DB_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user