mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
rename API
This commit is contained in:
parent
52960d4e7d
commit
93e92dab3b
@ -245,7 +245,7 @@ void ServerAsynchronousMetrics::updateImpl(AsynchronousMetricValues & new_values
|
||||
calculateMax(max_part_count_for_partition, table_merge_tree->getMaxPartsCountAndSizeForPartition().first);
|
||||
total_number_of_bytes += table_merge_tree->totalBytes(settings).value();
|
||||
total_number_of_rows += table_merge_tree->totalRows(settings).value();
|
||||
total_number_of_parts += table_merge_tree->getPartsCount();
|
||||
total_number_of_parts += table_merge_tree->getActivePartsCount();
|
||||
}
|
||||
|
||||
if (StorageReplicatedMergeTree * table_replicated_merge_tree = typeid_cast<StorageReplicatedMergeTree *>(table.get()))
|
||||
|
@ -3991,7 +3991,7 @@ size_t MergeTreeData::getTotalActiveSizeInRows() const
|
||||
}
|
||||
|
||||
|
||||
size_t MergeTreeData::getPartsCount() const
|
||||
size_t MergeTreeData::getActivePartsCount() const
|
||||
{
|
||||
return total_active_size_parts.load(std::memory_order_acquire);
|
||||
}
|
||||
@ -4062,7 +4062,7 @@ void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until, const Contex
|
||||
{
|
||||
const auto settings = getSettings();
|
||||
const auto & query_settings = query_context->getSettingsRef();
|
||||
const size_t parts_count_in_total = getPartsCount();
|
||||
const size_t parts_count_in_total = getActivePartsCount();
|
||||
|
||||
/// check if have too many parts in total
|
||||
if (parts_count_in_total >= settings->max_parts_in_total)
|
||||
@ -5305,13 +5305,15 @@ MergeTreeData::DataPartsVector MergeTreeData::getAllDataPartsVector(MergeTreeDat
|
||||
return res;
|
||||
}
|
||||
|
||||
size_t MergeTreeData::getDataPartsSize() const {
|
||||
size_t MergeTreeData::getAllDataPartsSize() const
|
||||
{
|
||||
return data_parts_by_info.size();
|
||||
}
|
||||
|
||||
size_t MergeTreeData::getTotalMarksCount() const {
|
||||
size_t MergeTreeData::getTotalMarksCount() const
|
||||
{
|
||||
size_t total_marks = 0;
|
||||
for (auto & part : getAllDataPartsVector())
|
||||
for (auto & part : data_parts_by_info)
|
||||
{
|
||||
total_marks += part->getMarksCount();
|
||||
}
|
||||
|
@ -474,9 +474,9 @@ public:
|
||||
|
||||
/// Returns absolutely all parts (and snapshot of their states)
|
||||
DataPartsVector getAllDataPartsVector(DataPartStateVector * out_states = nullptr) const;
|
||||
|
||||
|
||||
/// Return parts number
|
||||
size_t getDataPartsSize() const;
|
||||
size_t getAllDataPartsSize() const;
|
||||
|
||||
/// Return the number of marks in all parts
|
||||
size_t getTotalMarksCount() const;
|
||||
@ -525,7 +525,7 @@ public:
|
||||
|
||||
size_t getTotalActiveSizeInRows() const;
|
||||
|
||||
size_t getPartsCount() const;
|
||||
size_t getActivePartsCount() const;
|
||||
|
||||
/// Returns a pair with: max number of parts in partition across partitions; sum size of parts inside that partition.
|
||||
/// (if there are multiple partitions with max number of parts, the sum size of parts is returned for arbitrary of them)
|
||||
|
@ -463,7 +463,7 @@ protected:
|
||||
if (columns_mask[src_index++])
|
||||
{
|
||||
if (table_merge_tree)
|
||||
res_columns[res_index++]->insert(table_merge_tree->getDataPartsSize());
|
||||
res_columns[res_index++]->insert(table_merge_tree->getAllDataPartsSize());
|
||||
else
|
||||
res_columns[res_index++]->insertDefault();
|
||||
}
|
||||
@ -471,7 +471,7 @@ protected:
|
||||
if (columns_mask[src_index++])
|
||||
{
|
||||
if (table_merge_tree)
|
||||
res_columns[res_index++]->insert(table_merge_tree->getPartsCount());
|
||||
res_columns[res_index++]->insert(table_merge_tree->getActivePartsCount());
|
||||
else
|
||||
res_columns[res_index++]->insertDefault();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user