mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Fix bad code in the system.filesystem_cache
This commit is contained in:
parent
43376f0037
commit
e618dc993e
@ -1,7 +1,6 @@
|
||||
#include "StorageSystemFilesystemCache.h"
|
||||
#include <DataTypes/DataTypeString.h>
|
||||
#include <DataTypes/DataTypesNumber.h>
|
||||
#include <DataTypes/DataTypeTuple.h>
|
||||
#include <DataTypes/DataTypeNullable.h>
|
||||
#include <Interpreters/Cache/FileCache.h>
|
||||
#include <Interpreters/Cache/FileSegment.h>
|
||||
@ -68,18 +67,13 @@ void StorageSystemFilesystemCache::fillData(MutableColumns & res_columns, Contex
|
||||
res_columns[i++]->insert(file_segment->getDownloadedSize());
|
||||
res_columns[i++]->insert(toString(file_segment->getKind()));
|
||||
res_columns[i++]->insert(file_segment->isUnbound());
|
||||
try
|
||||
{
|
||||
if (fs::exists(path))
|
||||
|
||||
std::error_code ignored;
|
||||
if (fs::exists(path, ignored))
|
||||
res_columns[i++]->insert(fs::file_size(path));
|
||||
else
|
||||
res_columns[i++]->insertDefault();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
res_columns[i++]->insertDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user