mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Merge pull request #43571 from ClickHouse/revert-43404-part.log.uuid
Revert "Add table_uuid to system.parts"
This commit is contained in:
commit
52de0423bf
@ -6,7 +6,6 @@
|
||||
#include <DataTypes/DataTypeDate.h>
|
||||
#include <DataTypes/DataTypeString.h>
|
||||
#include <DataTypes/DataTypeEnum.h>
|
||||
#include <DataTypes/DataTypeUUID.h>
|
||||
#include <Storages/MergeTree/IMergeTreeDataPart.h>
|
||||
#include <Storages/MergeTree/MergeTreeData.h>
|
||||
#include <Interpreters/PartLog.h>
|
||||
@ -101,7 +100,6 @@ NamesAndTypesList PartLogElement::getNamesAndTypes()
|
||||
|
||||
{"database", std::make_shared<DataTypeString>()},
|
||||
{"table", std::make_shared<DataTypeString>()},
|
||||
{"table_uuid", std::make_shared<DataTypeUUID>()},
|
||||
{"part_name", std::make_shared<DataTypeString>()},
|
||||
{"partition_id", std::make_shared<DataTypeString>()},
|
||||
{"part_type", std::make_shared<DataTypeString>()},
|
||||
@ -139,7 +137,6 @@ void PartLogElement::appendToBlock(MutableColumns & columns) const
|
||||
|
||||
columns[i++]->insert(database_name);
|
||||
columns[i++]->insert(table_name);
|
||||
columns[i++]->insert(table_uuid);
|
||||
columns[i++]->insert(part_name);
|
||||
columns[i++]->insert(partition_id);
|
||||
columns[i++]->insert(part_type.toString());
|
||||
@ -208,7 +205,6 @@ bool PartLog::addNewParts(
|
||||
|
||||
elem.database_name = table_id.database_name;
|
||||
elem.table_name = table_id.table_name;
|
||||
elem.table_uuid = table_id.uuid;
|
||||
elem.partition_id = part->info.partition_id;
|
||||
elem.part_name = part->name;
|
||||
elem.disk_name = part->getDataPartStorage().getDiskName();
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <Interpreters/SystemLog.h>
|
||||
#include <Core/NamesAndTypes.h>
|
||||
#include <Core/NamesAndAliases.h>
|
||||
#include <Core/UUID.h>
|
||||
#include <Storages/MergeTree/MergeType.h>
|
||||
#include <Storages/MergeTree/MergeAlgorithm.h>
|
||||
|
||||
@ -56,7 +55,6 @@ struct PartLogElement
|
||||
|
||||
String database_name;
|
||||
String table_name;
|
||||
UUID table_uuid{UUIDHelpers::Nil};
|
||||
String part_name;
|
||||
String partition_id;
|
||||
String disk_name;
|
||||
|
@ -1848,7 +1848,6 @@ void MergeTreeData::removePartsFinally(const MergeTreeData::DataPartsVector & pa
|
||||
|
||||
part_log_elem.database_name = table_id.database_name;
|
||||
part_log_elem.table_name = table_id.table_name;
|
||||
part_log_elem.table_uuid = table_id.uuid;
|
||||
|
||||
for (const auto & part : parts)
|
||||
{
|
||||
@ -6599,7 +6598,6 @@ try
|
||||
|
||||
part_log_elem.database_name = table_id.database_name;
|
||||
part_log_elem.table_name = table_id.table_name;
|
||||
part_log_elem.table_uuid = table_id.uuid;
|
||||
part_log_elem.partition_id = MergeTreePartInfo::fromPartName(new_part_name, format_version).partition_id;
|
||||
part_log_elem.part_name = new_part_name;
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
NewPart NotAMerge
|
||||
MergeParts RegularMerge
|
||||
RemovePart NotAMerge
|
@ -1,16 +0,0 @@
|
||||
create table data_02491 (key Int) engine=MergeTree() order by tuple();
|
||||
insert into data_02491 values (1);
|
||||
optimize table data_02491 final;
|
||||
truncate table data_02491;
|
||||
|
||||
system flush logs;
|
||||
with (select uuid from system.tables where database = currentDatabase() and table = 'data_02491') as table_uuid_
|
||||
select event_type, merge_reason from system.part_log
|
||||
where
|
||||
database = currentDatabase() and
|
||||
table = 'data_02491' and
|
||||
table_uuid = table_uuid_ and
|
||||
table_uuid != toUUIDOrDefault(Null)
|
||||
order by event_time_microseconds;
|
||||
|
||||
drop table data_02491;
|
Loading…
Reference in New Issue
Block a user