Skip to content

Commit fc456bc

Browse files
committed
MDEV-27593 InnoDB handle AIO errors - more detailed assertion
Step 1 in handling InnoDB AIO assertions better is to get more detail of the cases of error. This doesn't resolve MDEV-27593, but increases the level of information in the assertion.
1 parent 781948a commit fc456bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

storage/innobase/os/os0file.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3584,9 +3584,17 @@ extern void fil_aio_callback(const IORequest &request);
35843584

35853585
static void io_callback(tpool::aiocb* cb)
35863586
{
3587-
ut_a(cb->m_err == DB_SUCCESS);
35883587
const IORequest request(*static_cast<const IORequest*>
35893588
(static_cast<const void*>(cb->m_userdata)));
3589+
if (cb->m_err != DB_SUCCESS)
3590+
{
3591+
ib::fatal() << "IO Error: " << cb->m_err << " during " <<
3592+
(request.is_async() ? "async " : "sync ") <<
3593+
(request.is_LRU() ? "lru " : "") <<
3594+
(cb->m_opcode == tpool::aio_opcode::AIO_PREAD ? "read" : "write") <<
3595+
" of " << cb->m_len << " bytes, for file " << cb->m_fh << ", returned " <<
3596+
cb->m_ret_len;
3597+
}
35903598
/* Return cb back to cache*/
35913599
if (cb->m_opcode == tpool::aio_opcode::AIO_PREAD)
35923600
{

0 commit comments

Comments
 (0)