From fc456bc97e8dfe08667e3ddd36941a3bd4dde340 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sat, 9 Jul 2022 12:28:48 +1000 Subject: 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. --- storage/innobase/os/os0file.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'storage') diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 902642bbfec..e3356624b4d 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -3584,9 +3584,17 @@ extern void fil_aio_callback(const IORequest &request); static void io_callback(tpool::aiocb* cb) { - ut_a(cb->m_err == DB_SUCCESS); const IORequest request(*static_cast (static_cast(cb->m_userdata))); + if (cb->m_err != DB_SUCCESS) + { + ib::fatal() << "IO Error: " << cb->m_err << " during " << + (request.is_async() ? "async " : "sync ") << + (request.is_LRU() ? "lru " : "") << + (cb->m_opcode == tpool::aio_opcode::AIO_PREAD ? "read" : "write") << + " of " << cb->m_len << " bytes, for file " << cb->m_fh << ", returned " << + cb->m_ret_len; + } /* Return cb back to cache*/ if (cb->m_opcode == tpool::aio_opcode::AIO_PREAD) { -- cgit v1.2.1