mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 14:42:02 +00:00
fix
This commit is contained in:
parent
f6a58bff4c
commit
fbaa70b313
@ -63,7 +63,7 @@ static bool isQueryInitialized()
|
||||
{
|
||||
return CurrentThread::isInitialized()
|
||||
&& CurrentThread::get().getQueryContext()
|
||||
&& CurrentThread::getQueryId().size != 0;
|
||||
&& CurrentThread::getQueryId().size() != 0;
|
||||
}
|
||||
|
||||
bool FileCache::isReadOnly()
|
||||
@ -82,7 +82,7 @@ FileCache::QueryContextPtr FileCache::getCurrentQueryContext(std::lock_guard<std
|
||||
if (!isQueryInitialized())
|
||||
return nullptr;
|
||||
|
||||
return getQueryContext(CurrentThread::getQueryId().toString(), cache_lock);
|
||||
return getQueryContext(std::string(CurrentThread::getQueryId()), cache_lock);
|
||||
}
|
||||
|
||||
FileCache::QueryContextPtr FileCache::getQueryContext(const String & query_id, std::lock_guard<std::mutex> & /* cache_lock */)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <Disks/ObjectStorages/LocalObjectStorage.h>
|
||||
|
||||
#include <Disks/ObjectStorages/DiskObjectStorageCommon.h>
|
||||
#include <Common/IFileCache.h>
|
||||
#include <Common/FileCache.h>
|
||||
#include <Common/FileCacheFactory.h>
|
||||
#include <Common/filesystemHelpers.h>
|
||||
#include <Common/logger_useful.h>
|
||||
|
@ -128,7 +128,7 @@ void S3ObjectStorage::removeCacheIfExists(const std::string & path_key)
|
||||
if (!cache || path_key.empty())
|
||||
return;
|
||||
|
||||
IFileCache::Key key = cache->hash(path_key);
|
||||
FileCache::Key key = cache->hash(path_key);
|
||||
cache->removeIfExists(key);
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ ReadSettings S3ObjectStorage::patchSettings(const ReadSettings & read_settings)
|
||||
ReadSettings settings{read_settings};
|
||||
if (cache)
|
||||
{
|
||||
if (IFileCache::isReadOnly())
|
||||
if (FileCache::isReadOnly())
|
||||
settings.read_from_filesystem_cache_if_exists_otherwise_bypass_cache = true;
|
||||
|
||||
settings.remote_fs_cache = cache;
|
||||
|
Loading…
Reference in New Issue
Block a user