Revert "Fix processing INSERT after metadata mutations that had not been applied yet"

The problem is that the atomic counter (alter_conversions_mutations) is
not accounted correctly for IMergeTreeDataPart::getMetadataVersion()

This reverts commit 0124642b39f538eaf2b1c7cfab9a0a917b1b12f6.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2024-04-11 14:54:53 +02:00
parent c048ab9d6d
commit d2a922bd44
2 changed files with 2 additions and 2 deletions

View File

@ -430,7 +430,7 @@ MergeTreeDataWriter::TemporaryPart MergeTreeDataWriter::writeTempPartImpl(
MergeTreePartition partition(block_with_partition.partition);
MergeTreePartInfo new_part_info(partition.getID(metadata_snapshot->getPartitionKey().sample_block), block_number, block_number, 0, metadata_snapshot->getMetadataVersion());
MergeTreePartInfo new_part_info(partition.getID(metadata_snapshot->getPartitionKey().sample_block), block_number, block_number, 0);
String part_name;
if (data.format_version < MERGE_TREE_DATA_MIN_FORMAT_VERSION_WITH_CUSTOM_PARTITIONING)
{

View File

@ -859,7 +859,7 @@ std::pair<std::vector<String>, bool> ReplicatedMergeTreeSinkImpl<async_insert>::
part->info.min_block = block_number;
part->info.max_block = block_number;
part->info.level = 0;
part->info.mutation = metadata_snapshot->getMetadataVersion();
part->info.mutation = 0;
part->setName(part->getNewName(part->info));
retry_context.actual_part_name = part->name;