mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Better
This commit is contained in:
parent
350ff96628
commit
00bf90186a
@ -3222,9 +3222,8 @@ void MergeTreeData::outdateBrokenPartAndCloneToDetached(const DataPartPtr & part
|
||||
part_to_detach->makeCloneInDetached(prefix, metadata_snapshot);
|
||||
|
||||
auto lock = lockParts();
|
||||
auto it_part = data_parts_by_info.find(part_to_detach->info);
|
||||
|
||||
if (it_part == data_parts_by_info.end())
|
||||
if (auto it_part = data_parts_by_info.find(part_to_detach->info); it_part == data_parts_by_info.end())
|
||||
throw Exception("No such data part " + part_to_detach->getNameWithState(), ErrorCodes::NO_SUCH_DATA_PART);
|
||||
|
||||
removePartsFromWorkingSet(nullptr, {part_to_detach}, true, lock);
|
||||
|
Loading…
Reference in New Issue
Block a user