mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 17:20:50 +00:00
Fix
This commit is contained in:
parent
ab3ab9fa41
commit
8bdd1e93ae
@ -725,14 +725,16 @@ IStorage::ColumnSizeByName StorageLog::getColumnSizes() const
|
||||
std::shared_lock lock(rwlock, std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC));
|
||||
ColumnSizeByName column_sizes;
|
||||
FileChecker::Map file_sizes = file_checker.getFileSizes();
|
||||
|
||||
|
||||
for (const auto & column : getInMemoryMetadata().getColumns().getAllPhysical())
|
||||
{
|
||||
ISerialization::StreamCallback stream_callback = [&] (const ISerialization::SubstreamPath & substream_path)
|
||||
ISerialization::StreamCallback stream_callback = [&, this] (const ISerialization::SubstreamPath & substream_path)
|
||||
{
|
||||
String stream_name = ISerialization::getFileNameForStream(column, substream_path);
|
||||
ColumnSize & size = column_sizes[column.name];
|
||||
size.data_compressed += file_sizes[stream_name];
|
||||
auto it = files.find(stream_name);
|
||||
if (it != files.end())
|
||||
size.data_compressed += file_sizes[fileName(it->second.data_file_path)];
|
||||
};
|
||||
|
||||
ISerialization::SubstreamPath substream_path;
|
||||
|
@ -529,14 +529,16 @@ IStorage::ColumnSizeByName StorageTinyLog::getColumnSizes() const
|
||||
std::shared_lock lock(rwlock, std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC));
|
||||
ColumnSizeByName column_sizes;
|
||||
FileChecker::Map file_sizes = file_checker.getFileSizes();
|
||||
|
||||
|
||||
for (const auto & column : getInMemoryMetadata().getColumns().getAllPhysical())
|
||||
{
|
||||
ISerialization::StreamCallback stream_callback = [&] (const ISerialization::SubstreamPath & substream_path)
|
||||
ISerialization::StreamCallback stream_callback = [&, this] (const ISerialization::SubstreamPath & substream_path)
|
||||
{
|
||||
String stream_name = ISerialization::getFileNameForStream(column, substream_path);
|
||||
ColumnSize & size = column_sizes[column.name];
|
||||
size.data_compressed += file_sizes[stream_name];
|
||||
auto it = files.find(stream_name);
|
||||
if (it != files.end())
|
||||
size.data_compressed += file_sizes[fileName(it->second.data_file_path)];
|
||||
};
|
||||
|
||||
ISerialization::SubstreamPath substream_path;
|
||||
|
Loading…
Reference in New Issue
Block a user