mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
Fix
This commit is contained in:
parent
931fb65762
commit
7530dd57f1
@ -118,7 +118,7 @@ LockedKeyPtr KeyMetadata::lockNoStateCheck()
|
||||
return std::make_unique<LockedKey>(shared_from_this());
|
||||
}
|
||||
|
||||
bool KeyMetadata::createBaseDirectory()
|
||||
bool KeyMetadata::createBaseDirectory(bool throw_if_failed)
|
||||
{
|
||||
if (!created_base_directory.exchange(true))
|
||||
{
|
||||
@ -131,7 +131,7 @@ bool KeyMetadata::createBaseDirectory()
|
||||
{
|
||||
created_base_directory = false;
|
||||
|
||||
if (e.code() == std::errc::no_space_on_device)
|
||||
if (!throw_if_failed && e.code() == std::errc::no_space_on_device)
|
||||
{
|
||||
LOG_TRACE(cache_metadata->log, "Failed to create base directory for key {}, "
|
||||
"because no space left on device", key);
|
||||
|
@ -113,7 +113,7 @@ struct KeyMetadata : private std::map<size_t, FileSegmentMetadataPtr>,
|
||||
|
||||
LockedKeyPtr tryLock();
|
||||
|
||||
bool createBaseDirectory();
|
||||
bool createBaseDirectory(bool throw_if_failed = false);
|
||||
|
||||
std::string getPath() const;
|
||||
|
||||
|
@ -111,7 +111,7 @@ FileSegmentsHolderPtr TemporaryDataOnDisk::createCacheFile(size_t max_file_size)
|
||||
CreateFileSegmentSettings(FileSegmentKind::Temporary, /* unbounded */ true), FileCache::getCommonUser());
|
||||
|
||||
chassert(holder->size() == 1);
|
||||
holder->back().getKeyMetadata()->createBaseDirectory();
|
||||
holder->back().getKeyMetadata()->createBaseDirectory(/* throw_if_failed */true);
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user