diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 374af7f533c..066d52bc138 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -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) \ diff --git a/src/Disks/IO/CachedReadBufferFromRemoteFS.cpp b/src/Disks/IO/CachedReadBufferFromRemoteFS.cpp index c8924ae35bc..6be35560faa 100644 --- a/src/Disks/IO/CachedReadBufferFromRemoteFS.cpp +++ b/src/Disks/IO/CachedReadBufferFromRemoteFS.cpp @@ -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)