This commit is contained in:
Alexander Tokmakov 2022-10-07 20:22:03 +02:00
parent ed76584876
commit 1a78e8a817
2 changed files with 5 additions and 1 deletions

View File

@ -3222,7 +3222,10 @@ void MergeTreeData::outdateBrokenPartAndCloneToDetached(const DataPartPtr & part
LOG_INFO(log, "Cloning part {} to {}_{} and making it obsolete.", part_to_detach->data_part_storage->getPartDirectory(), prefix, part_to_detach->name);
part_to_detach->makeCloneInDetached(prefix, metadata_snapshot);
removePartsFromWorkingSet(NO_TRANSACTION_RAW, {part_to_detach}, true);
DataPartsLock lock = lockParts();
if (part_to_detach->getState() == DataPartState::Active)
removePartsFromWorkingSet(NO_TRANSACTION_RAW, {part_to_detach}, true, &lock);
}
void MergeTreeData::forcefullyMovePartToDetachedAndRemoveFromMemory(const MergeTreeData::DataPartPtr & part_to_detach, const String & prefix, bool restore_covered)

View File

@ -1,3 +1,4 @@
-- Tags: long
drop table if exists rmt1;
drop table if exists rmt2;