From d8250ab3d697bdf9053f88d672cf3d70d8a687b9 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 26 Aug 2021 01:14:42 +0300 Subject: [PATCH] Preparation --- src/Core/Settings.h | 1 + src/Interpreters/Context.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 46fa915595e..7114daaec33 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -501,6 +501,7 @@ class IColumn; \ M(String, local_filesystem_read_method, "pread", "Method of reading data from local filesystem, one of: read, pread, mmap, pread_threadpool.", 0) \ M(Bool, local_filesystem_read_prefetch, false, "Should use prefetching when reading data from local filesystem.", 0) \ + M(Bool, remote_filesystem_read_prefetch, true, "Should use prefetching when reading data from remote filesystem.", 0) \ M(Int64, read_priority, 0, "Priority to read data from local filesystem. Only supported for 'pread_threadpool' method.", 0) \ \ /** Experimental functions */ \ diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index 436f88763fd..9fe14cf44d6 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -2709,6 +2709,8 @@ ReadSettings Context::getReadSettings() const throw Exception(ErrorCodes::UNKNOWN_READ_METHOD, "Unknown read method '{}'", settings.local_filesystem_read_method.value); res.local_fs_prefetch = settings.local_filesystem_read_prefetch; + res.remote_fs_prefetch = settings.remote_filesystem_read_prefetch; + res.local_fs_buffer_size = settings.max_read_buffer_size; res.direct_io_threshold = settings.min_bytes_to_use_direct_io; res.mmap_threshold = settings.min_bytes_to_use_mmap_io;