From f4fb6cb3fe645040ae9046fa8cbd9f29d5fe745d Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 10 Mar 2022 18:15:25 +1100 Subject: [PATCH] MDEV-27900: aio handle partial reads/writes (uring) MDEV-27900 continued for uring. Also spell synchronously correctly in sql_parse.cc. Reviewed by Wlad. --- sql/sql_parse.cc | 2 +- tpool/aio_liburing.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0886fc85151..b26320fc098 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1190,7 +1190,7 @@ static enum enum_server_command fetch_command(THD *thd, char *packet) DISPATCH_COMMAND_CLOSE_CONNECTION request of THD shutdown (s. dispatch_command() description) @retval - DISPATCH_COMMAND_WOULDBLOCK - need to wait for asyncronous operations + DISPATCH_COMMAND_WOULDBLOCK - need to wait for asynchronous operations to finish. Only returned if parameter 'blocking' is false. */ diff --git a/tpool/aio_liburing.cc b/tpool/aio_liburing.cc index cca95bb6d37..b8666482193 100644 --- a/tpool/aio_liburing.cc +++ b/tpool/aio_liburing.cc @@ -161,6 +161,8 @@ private: } io_uring_cqe_seen(&aio->uring_, cqe); + if (iocb->m_ret_len != iocb->m_len && !iocb->m_err) + finish_synchronous(iocb); // If we need to resubmit the IO operation, but the ring is full, // we will follow the same path as for any other error codes.