diff --git a/dbms/src/Storages/DeltaMerge/RowKeyRangeUtils.cpp b/dbms/src/Storages/DeltaMerge/RowKeyRangeUtils.cpp index aeab6c24f6b..0ea295d8fd5 100644 --- a/dbms/src/Storages/DeltaMerge/RowKeyRangeUtils.cpp +++ b/dbms/src/Storages/DeltaMerge/RowKeyRangeUtils.cpp @@ -175,7 +175,7 @@ RowKeyRanges tryMergeRanges(RowKeyRanges && sorted_ranges, size_t expected_range if (log) LOG_FMT_TRACE( log, - " [original ranges: {}] [expected ranges: {}] [after merged ranges: {}] [final ranges: {}]", + "[original ranges: {}] [expected ranges: {}] [after merged ranges: {}] [final ranges: {}]", ori_size, expected_ranges_count, after_merge_count, diff --git a/dbms/src/Storages/DeltaMerge/tools/workload/DTWorkload.cpp b/dbms/src/Storages/DeltaMerge/tools/workload/DTWorkload.cpp index 2ff63dd0c53..1cabbb97907 100644 --- a/dbms/src/Storages/DeltaMerge/tools/workload/DTWorkload.cpp +++ b/dbms/src/Storages/DeltaMerge/tools/workload/DTWorkload.cpp @@ -31,8 +31,6 @@ #include #include -#include "Common/LogWithPrefix.h" - namespace DB::DM::tests { DB::Settings createSettings(const std::string & fname) diff --git a/dbms/src/Storages/System/StorageSystemDTTables.cpp b/dbms/src/Storages/System/StorageSystemDTTables.cpp index 9523aff1f44..b3f9cf5b29e 100644 --- a/dbms/src/Storages/System/StorageSystemDTTables.cpp +++ b/dbms/src/Storages/System/StorageSystemDTTables.cpp @@ -28,7 +28,8 @@ namespace DB { -StorageSystemDTTables::StorageSystemDTTables(const std::string & name_) : name(name_) +StorageSystemDTTables::StorageSystemDTTables(const std::string & name_) + : name(name_) { setColumns(ColumnsDescription({ {"database", std::make_shared()}, @@ -85,6 +86,7 @@ StorageSystemDTTables::StorageSystemDTTables(const std::string & name_) : name(n {"storage_stable_num_snapshots", std::make_shared()}, {"storage_stable_oldest_snapshot_lifetime", std::make_shared()}, {"storage_stable_oldest_snapshot_thread_id", std::make_shared()}, + {"storage_stable_oldest_snapshot_tracing_id", std::make_shared()}, {"storage_stable_num_pages", std::make_shared()}, {"storage_stable_num_normal_pages", std::make_shared()}, {"storage_stable_max_page_id", std::make_shared()}, @@ -92,6 +94,7 @@ StorageSystemDTTables::StorageSystemDTTables(const std::string & name_) : name(n {"storage_delta_num_snapshots", std::make_shared()}, {"storage_delta_oldest_snapshot_lifetime", std::make_shared()}, {"storage_delta_oldest_snapshot_thread_id", std::make_shared()}, + {"storage_delta_oldest_snapshot_tracing_id", std::make_shared()}, {"storage_delta_num_pages", std::make_shared()}, {"storage_delta_num_normal_pages", std::make_shared()}, {"storage_delta_max_page_id", std::make_shared()}, @@ -99,6 +102,7 @@ StorageSystemDTTables::StorageSystemDTTables(const std::string & name_) : name(n {"storage_meta_num_snapshots", std::make_shared()}, {"storage_meta_oldest_snapshot_lifetime", std::make_shared()}, {"storage_meta_oldest_snapshot_thread_id", std::make_shared()}, + {"storage_meta_oldest_snapshot_tracing_id", std::make_shared()}, {"storage_meta_num_pages", std::make_shared()}, {"storage_meta_num_normal_pages", std::make_shared()}, {"storage_meta_max_page_id", std::make_shared()}, @@ -108,7 +112,8 @@ StorageSystemDTTables::StorageSystemDTTables(const std::string & name_) : name(n } -BlockInputStreams StorageSystemDTTables::read(const Names & column_names, +BlockInputStreams StorageSystemDTTables::read( + const Names & column_names, const SelectQueryInfo &, const Context & context, QueryProcessingStage::Enum & processed_stage, @@ -126,19 +131,19 @@ BlockInputStreams StorageSystemDTTables::read(const Names & column_names, for (const auto & d : databases) { String database_name = d.first; - auto & database = d.second; + const auto & database = d.second; const DatabaseTiFlash * db_tiflash = typeid_cast(database.get()); auto it = database->getIterator(context); for (; it->isValid(); it->next()) { - auto & table_name = it->name(); + const auto & table_name = it->name(); auto & storage = it->table(); if (storage->getName() != MutableSupport::delta_tree_storage_name) continue; auto dm_storage = std::dynamic_pointer_cast(storage); - auto & table_info = dm_storage->getTableInfo(); + const auto & table_info = dm_storage->getTableInfo(); auto table_id = table_info.id; auto stat = dm_storage->getStore()->getStat(); @@ -201,6 +206,7 @@ BlockInputStreams StorageSystemDTTables::read(const Names & column_names, res_columns[j++]->insert(stat.storage_stable_num_snapshots); res_columns[j++]->insert(stat.storage_stable_oldest_snapshot_lifetime); res_columns[j++]->insert(stat.storage_stable_oldest_snapshot_thread_id); + res_columns[j++]->insert(stat.storage_stable_oldest_snapshot_tracing_id); res_columns[j++]->insert(stat.storage_stable_num_pages); res_columns[j++]->insert(stat.storage_stable_num_normal_pages); res_columns[j++]->insert(stat.storage_stable_max_page_id); @@ -208,6 +214,7 @@ BlockInputStreams StorageSystemDTTables::read(const Names & column_names, res_columns[j++]->insert(stat.storage_delta_num_snapshots); res_columns[j++]->insert(stat.storage_delta_oldest_snapshot_lifetime); res_columns[j++]->insert(stat.storage_delta_oldest_snapshot_thread_id); + res_columns[j++]->insert(stat.storage_delta_oldest_snapshot_tracing_id); res_columns[j++]->insert(stat.storage_delta_num_pages); res_columns[j++]->insert(stat.storage_delta_num_normal_pages); res_columns[j++]->insert(stat.storage_delta_max_page_id); @@ -215,6 +222,7 @@ BlockInputStreams StorageSystemDTTables::read(const Names & column_names, res_columns[j++]->insert(stat.storage_meta_num_snapshots); res_columns[j++]->insert(stat.storage_meta_oldest_snapshot_lifetime); res_columns[j++]->insert(stat.storage_meta_oldest_snapshot_thread_id); + res_columns[j++]->insert(stat.storage_meta_oldest_snapshot_tracing_id); res_columns[j++]->insert(stat.storage_meta_num_pages); res_columns[j++]->insert(stat.storage_meta_num_normal_pages); res_columns[j++]->insert(stat.storage_meta_max_page_id);