Renaming according to the review suggestions

This commit is contained in:
Alexey Milovidov 2021-08-28 01:32:35 +03:00
parent 79e0433ba7
commit 71ed9ad060
4 changed files with 9 additions and 9 deletions

View File

@ -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();

View File

@ -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
{

View File

@ -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_)

View File

@ -62,18 +62,18 @@ std::unique_ptr<ReadBufferFromFileBase> createReadBufferFromFileBase(
}
else if (settings.local_fs_method == ReadMethod::pread || settings.local_fs_method == ReadMethod::mmap)
{
res = std::make_unique<ReadBufferFromFilePReadWithCache>(filename, buffer_size, actual_flags, existing_memory, alignment);
res = std::make_unique<ReadBufferFromFilePReadWithDescriptorsCache>(filename, buffer_size, actual_flags, existing_memory, alignment);
}
else if (settings.local_fs_method == ReadMethod::pread_fake_async)
{
static AsynchronousReaderPtr reader = std::make_shared<SynchronousReader>();
res = std::make_unique<AsynchronousReadBufferFromFileWithCache>(
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
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<ThreadPoolReader>(16, 1000000);
res = std::make_unique<AsynchronousReadBufferFromFileWithCache>(
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
reader, settings.priority, filename, buffer_size, actual_flags, existing_memory, alignment);
}
else