From 71ed9ad060b7cdacf8bbfa95bedce59d5c0dc1f5 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 28 Aug 2021 01:32:35 +0300 Subject: [PATCH] Renaming according to the review suggestions --- src/IO/AsynchronousReadBufferFromFile.cpp | 2 +- src/IO/AsynchronousReadBufferFromFile.h | 6 +++--- src/IO/ReadBufferFromFile.h | 4 ++-- src/IO/createReadBufferFromFileBase.cpp | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/IO/AsynchronousReadBufferFromFile.cpp b/src/IO/AsynchronousReadBufferFromFile.cpp index 07392b2b403..9327b80738d 100644 --- a/src/IO/AsynchronousReadBufferFromFile.cpp +++ b/src/IO/AsynchronousReadBufferFromFile.cpp @@ -95,7 +95,7 @@ void AsynchronousReadBufferFromFile::close() } -AsynchronousReadBufferFromFileWithCache::~AsynchronousReadBufferFromFileWithCache() +AsynchronousReadBufferFromFileWithDescriptorsCache::~AsynchronousReadBufferFromFileWithDescriptorsCache() { /// Must wait for events in flight before potentially closing the file by destroying OpenedFilePtr. finalize(); diff --git a/src/IO/AsynchronousReadBufferFromFile.h b/src/IO/AsynchronousReadBufferFromFile.h index e3e8a1c7b86..d9d5e43e0d4 100644 --- a/src/IO/AsynchronousReadBufferFromFile.h +++ b/src/IO/AsynchronousReadBufferFromFile.h @@ -40,14 +40,14 @@ public: /** Similar to AsynchronousReadBufferFromFile but also transparently shares open file descriptors. */ -class AsynchronousReadBufferFromFileWithCache : public AsynchronousReadBufferFromFileDescriptor +class AsynchronousReadBufferFromFileWithDescriptorsCache : public AsynchronousReadBufferFromFileDescriptor { private: std::string file_name; OpenedFileCache::OpenedFilePtr file; public: - AsynchronousReadBufferFromFileWithCache( + AsynchronousReadBufferFromFileWithDescriptorsCache( AsynchronousReaderPtr reader_, Int32 priority_, const std::string & file_name_, size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE, int flags = -1, char * existing_memory = nullptr, size_t alignment = 0) @@ -58,7 +58,7 @@ public: fd = file->getFD(); } - ~AsynchronousReadBufferFromFileWithCache() override; + ~AsynchronousReadBufferFromFileWithDescriptorsCache() override; std::string getFileName() const override { diff --git a/src/IO/ReadBufferFromFile.h b/src/IO/ReadBufferFromFile.h index 7ef237bb3c1..1a45e4c1829 100644 --- a/src/IO/ReadBufferFromFile.h +++ b/src/IO/ReadBufferFromFile.h @@ -61,14 +61,14 @@ public: /** Similar to ReadBufferFromFilePRead but also transparently shares open file descriptors. */ -class ReadBufferFromFilePReadWithCache : public ReadBufferFromFileDescriptorPRead +class ReadBufferFromFilePReadWithDescriptorsCache : public ReadBufferFromFileDescriptorPRead { private: std::string file_name; OpenedFileCache::OpenedFilePtr file; public: - ReadBufferFromFilePReadWithCache(const std::string & file_name_, size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE, int flags = -1, + ReadBufferFromFilePReadWithDescriptorsCache(const std::string & file_name_, size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE, int flags = -1, char * existing_memory = nullptr, size_t alignment = 0) : ReadBufferFromFileDescriptorPRead(-1, buf_size, existing_memory, alignment), file_name(file_name_) diff --git a/src/IO/createReadBufferFromFileBase.cpp b/src/IO/createReadBufferFromFileBase.cpp index c7f06216e34..f828199a2b4 100644 --- a/src/IO/createReadBufferFromFileBase.cpp +++ b/src/IO/createReadBufferFromFileBase.cpp @@ -62,18 +62,18 @@ std::unique_ptr createReadBufferFromFileBase( } else if (settings.local_fs_method == ReadMethod::pread || settings.local_fs_method == ReadMethod::mmap) { - res = std::make_unique(filename, buffer_size, actual_flags, existing_memory, alignment); + res = std::make_unique(filename, buffer_size, actual_flags, existing_memory, alignment); } else if (settings.local_fs_method == ReadMethod::pread_fake_async) { static AsynchronousReaderPtr reader = std::make_shared(); - res = std::make_unique( + res = std::make_unique( reader, settings.priority, filename, buffer_size, actual_flags, existing_memory, alignment); } else if (settings.local_fs_method == ReadMethod::pread_threadpool) { static AsynchronousReaderPtr reader = std::make_shared(16, 1000000); - res = std::make_unique( + res = std::make_unique( reader, settings.priority, filename, buffer_size, actual_flags, existing_memory, alignment); } else