Commit b3f7d52e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-10918 Innodb/Linux - Fallback to simulated aio if io_setup() fails, e.g...

MDEV-10918 Innodb/Linux - Fallback to simulated aio if io_setup() fails, e.g due to insufficient resources
parent 098f0aed
......@@ -4396,9 +4396,8 @@ sub extract_warning_lines ($$) {
qr|Aborted connection|,
qr|table.*is full|,
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
qr|Error: io_setup\(\) failed|,
qr|Warning: io_setup\(\) failed|,
qr|Warning: io_setup\(\) attempt|,
qr|InnoDB: io_setup\(\) attempt|,
qr|InnoDB: io_setup\(\) failed with EAGAIN|,
qr|setrlimit could not change the size of core files to 'infinity';|,
qr|feedback plugin: failed to retrieve the MAC address|,
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 something bad happened during aio setup
we should call it a day and return right away.
We don't care about any leaks because a failure
to initialize the io subsystem means that the
server (or atleast the innodb storage engine)
is not going to startup. */
return(DB_IO_ERROR);
we disable linux native aio.
The disadvantage will be a small memory leak
at shutdown but that's ok compared to a crash
or a not working server.
This frequently happens when running the test suite
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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment