Fix move partition for storage merge tree

This commit is contained in:
Guillaume Tassery 2019-09-16 06:17:37 +02:00
parent 9cca599749
commit ae8db96415

View File

@ -1241,9 +1241,7 @@ void StorageMergeTree::movePartitionTo(const StoragePtr & dest_table, const ASTP
dest_table_storage->renameTempPartAndReplace(part, &increment, &transaction, data_parts_lock); dest_table_storage->renameTempPartAndReplace(part, &increment, &transaction, data_parts_lock);
transaction.commit(&data_parts_lock); transaction.commit(&data_parts_lock);
removePartsFromWorkingSet(src_parts, true, data_parts_lock);
/// If it is REPLACE (not ATTACH), remove all parts which max_block_number less then min_block_number of the first new block
removePartsInRangeFromWorkingSet(drop_range, true, false, data_parts_lock);
} }
PartLog::addNewParts(global_context, dst_parts, watch.elapsed()); PartLog::addNewParts(global_context, dst_parts, watch.elapsed());