From d951df1342b769253410376021fc5e97e486c6b9 Mon Sep 17 00:00:00 2001 From: proller Date: Mon, 18 Feb 2019 18:54:24 +0300 Subject: [PATCH] [PATCH] Fixup for "AIOcontextPool: Found io_event with unknown id 0'' error #4434 from urgordeadbeef --- dbms/src/IO/AIOContextPool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbms/src/IO/AIOContextPool.cpp b/dbms/src/IO/AIOContextPool.cpp index 7453452ea39..933d463cc38 100644 --- a/dbms/src/IO/AIOContextPool.cpp +++ b/dbms/src/IO/AIOContextPool.cpp @@ -84,7 +84,11 @@ void AIOContextPool::fulfillPromises(const io_event events[], const int num_even for (const auto & event : boost::make_iterator_range(events, events + num_events)) { /// get id from event +#if defined(__FreeBSD__) + const auto completed_id = (reinterpret_cast(event.udata))->aio_data; +#else const auto completed_id = event.data; +#endif /// set value via promise and release it const auto it = promises.find(completed_id);