mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
try fix build
This commit is contained in:
parent
f57abbd806
commit
b97bf456c6
@ -148,6 +148,7 @@ if (BUILD_STANDALONE_KEEPER)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/createReadBufferFromFileBase.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/createReadBufferFromFileBase.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/ReadBufferFromRemoteFSGather.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/ReadBufferFromRemoteFSGather.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/IOUringReader.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/IOUringReader.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/getIOUringReader.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/WriteBufferFromTemporaryFile.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/WriteBufferFromTemporaryFile.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/WriteBufferWithFinalizeCallback.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/WriteBufferWithFinalizeCallback.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/AsynchronousBoundedReadBuffer.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Disks/IO/AsynchronousBoundedReadBuffer.cpp
|
||||||
|
@ -304,7 +304,7 @@ IAsynchronousReader & Context::getThreadPoolReader(FilesystemReaderType type) co
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
IOUringReader & Context::getIOURingReader() const
|
IOUringReader & Context::getIOUringReader() const
|
||||||
{
|
{
|
||||||
callOnce(shared->io_uring_reader_initialized, [&] {
|
callOnce(shared->io_uring_reader_initialized, [&] {
|
||||||
shared->io_uring_reader = createIOUringReader();
|
shared->io_uring_reader = createIOUringReader();
|
||||||
|
@ -137,7 +137,7 @@ public:
|
|||||||
|
|
||||||
IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type) const;
|
IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type) const;
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
IOUringReader & getIOURingReader() const;
|
IOUringReader & getIOUringReader() const;
|
||||||
#endif
|
#endif
|
||||||
std::shared_ptr<AsyncReadCounters> getAsyncReadCounters() const;
|
std::shared_ptr<AsyncReadCounters> getAsyncReadCounters() const;
|
||||||
ThreadPool & getThreadPoolWriter() const;
|
ThreadPool & getThreadPoolWriter() const;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <IO/MMapReadBufferFromFileWithCache.h>
|
#include <IO/MMapReadBufferFromFileWithCache.h>
|
||||||
#include <IO/AsynchronousReadBufferFromFile.h>
|
#include <IO/AsynchronousReadBufferFromFile.h>
|
||||||
#include <Disks/IO/IOUringReader.h>
|
#include <Disks/IO/IOUringReader.h>
|
||||||
#include <Disks/IO/IOUringReader.h>
|
#include <Disks/IO/getIOUringReader.h>
|
||||||
#include <Disks/IO/ThreadPoolReader.h>
|
#include <Disks/IO/ThreadPoolReader.h>
|
||||||
#include <Disks/IO/getThreadPoolReader.h>
|
#include <Disks/IO/getThreadPoolReader.h>
|
||||||
#include <IO/AsynchronousReader.h>
|
#include <IO/AsynchronousReader.h>
|
||||||
@ -100,7 +100,7 @@ std::unique_ptr<ReadBufferFromFileBase> createReadBufferFromFileBase(
|
|||||||
else if (settings.local_fs_method == LocalFSReadMethod::io_uring)
|
else if (settings.local_fs_method == LocalFSReadMethod::io_uring)
|
||||||
{
|
{
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
auto & reader = getIOURingReaderOrThrow();
|
auto & reader = getIOUringReaderOrThrow();
|
||||||
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
|
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
|
||||||
reader,
|
reader,
|
||||||
settings.priority,
|
settings.priority,
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#include "getIOUringReader.h"
|
#include <Disks/IO/getIOUringReader.h>
|
||||||
|
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
|
|
||||||
|
#include <Interpreters/Context.h>
|
||||||
#include <Common/ErrorCodes.h>
|
#include <Common/ErrorCodes.h>
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
@ -20,8 +21,8 @@ std::unique_ptr<IOUringReader> createIOUringReader()
|
|||||||
|
|
||||||
IOUringReader & getIOUringReaderOrThrow(ContextPtr context)
|
IOUringReader & getIOUringReaderOrThrow(ContextPtr context)
|
||||||
{
|
{
|
||||||
auto reader = context->getIOUringReader();
|
auto & reader = context->getIOUringReader();
|
||||||
if (!reader.isSupported)
|
if (!reader.isSupported())
|
||||||
{
|
{
|
||||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "io_uring is not supported by this system");
|
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "io_uring is not supported by this system");
|
||||||
}
|
}
|
||||||
@ -33,7 +34,7 @@ IOUringReader & getIOUringReaderOrThrow()
|
|||||||
auto context = Context::getGlobalContextInstance();
|
auto context = Context::getGlobalContextInstance();
|
||||||
if (!context)
|
if (!context)
|
||||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Global context not initialized");
|
throw Exception(ErrorCodes::LOGICAL_ERROR, "Global context not initialized");
|
||||||
return getIOUringReaderOrThrow(context)
|
return getIOUringReaderOrThrow(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <Interpreters/Context_fwd.h>
|
#include <Interpreters/Context_fwd.h>
|
||||||
#include <Disks/IO/IOUringReader.h>
|
#include <Disks/IO/IOUringReader.h>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
@ -5176,10 +5176,10 @@ IAsynchronousReader & Context::getThreadPoolReader(FilesystemReaderType type) co
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
IOUringReader & Context::getIOURingReader() const
|
IOUringReader & Context::getIOUringReader() const
|
||||||
{
|
{
|
||||||
callOnce(shared->io_uring_reader_initialized, [&] {
|
callOnce(shared->io_uring_reader_initialized, [&] {
|
||||||
shared->io_uring_reader = createIOUringReader()
|
shared->io_uring_reader = createIOUringReader();
|
||||||
});
|
});
|
||||||
|
|
||||||
return *shared->io_uring_reader;
|
return *shared->io_uring_reader;
|
||||||
|
@ -1243,7 +1243,7 @@ public:
|
|||||||
|
|
||||||
IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type) const;
|
IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type) const;
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
IOUringReader & getIOURingReader() const;
|
IOUringReader & getIOUringReader() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::shared_ptr<AsyncReadCounters> getAsyncReadCounters() const;
|
std::shared_ptr<AsyncReadCounters> getAsyncReadCounters() const;
|
||||||
|
@ -283,7 +283,7 @@ std::unique_ptr<ReadBuffer> selectReadBuffer(
|
|||||||
else if (read_method == LocalFSReadMethod::io_uring && !use_table_fd)
|
else if (read_method == LocalFSReadMethod::io_uring && !use_table_fd)
|
||||||
{
|
{
|
||||||
#if USE_LIBURING
|
#if USE_LIBURING
|
||||||
auto & reader = getIOURingReaderOrThrow(context);
|
auto & reader = getIOUringReaderOrThrow(context);
|
||||||
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
|
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
|
||||||
reader,
|
reader,
|
||||||
Priority{},
|
Priority{},
|
||||||
|
Loading…
Reference in New Issue
Block a user