This commit is contained in:
KinderRiven 2022-05-01 11:15:57 +08:00
parent 9413aa423b
commit 9c44ef1188
2 changed files with 3 additions and 2 deletions

View File

@ -557,7 +557,7 @@ class IColumn;
M(Bool, enable_filesystem_cache, true, "Use cache for remote filesystem. This setting does not turn on/off cache for disks (must me done via disk config), but allows to bypass cache for some queries if intended", 0) \
M(UInt64, filesystem_cache_max_wait_sec, 5, "Allow to wait at most this number of seconds for download of current remote_fs_buffer_size bytes, and skip cache if exceeded", 0) \
M(Bool, enable_filesystem_cache_on_write_operations, false, "Write into cache on write operations. To actually work this setting requires be added to disk config too", 0) \
M(Bool, enable_filesystem_cache_log, true, "Allows to record the filesystem caching log for each query", 0) \
M(Bool, enable_filesystem_cache_log, false, "Allows to record the filesystem caching log for each query", 0) \
M(Bool, read_from_filesystem_cache_if_exists_otherwise_bypass_cache, false, "", 0) \
\
M(Bool, use_structure_from_insertion_table_in_table_functions, false, "Use structure from insertion table instead of schema inference from data", 0) \

View File

@ -77,7 +77,8 @@ void CachedReadBufferFromRemoteFS::appendFilesystemCacheLog(
break;
}
Context::getGlobalContextInstance()->getFilesystemCacheLog()->add(elem);
if (auto cache_log = Context::getGlobalContextInstance()->getFilesystemCacheLog())
cache_log->add(elem);
}
void CachedReadBufferFromRemoteFS::initialize(size_t offset, size_t size)