Parent part can have prefix if it is in Temporary state

This commit is contained in:
Alexander Gololobov 2024-07-11 12:31:37 +02:00 committed by GitHub
parent 77a1d10b94
commit 3f3965b7f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,7 +319,10 @@ IMergeTreeDataPart::IMergeTreeDataPart(
{
if (parent_part)
{
chassert(parent_part_name.starts_with(parent_part->info.partition_id)); /// Make sure there's no prefix
if (parent_part->state != MergeTreeDataPartState::Temporary)
{
chassert(parent_part_name.starts_with(parent_part->info.partition_id)); /// Make sure there's no prefix
}
state = MergeTreeDataPartState::Active;
}