This commit is contained in:
kssenii 2022-09-11 15:48:22 +02:00
parent 5802c2fdd2
commit 02c3d8b0a0
2 changed files with 5 additions and 1 deletions

View File

@ -1990,10 +1990,11 @@ size_t MergeTreeData::clearOldBrokenPartsFromDetachedDirectory()
renamed_parts.tryRenameAll();
for (const auto & [old_name, new_name, disk] : renamed_parts.old_and_new_names)
for (auto & [old_name, new_name, disk] : renamed_parts.old_and_new_names)
{
removeDetachedPart(disk, fs::path(relative_data_path) / "detached" / new_name / "", old_name, false);
LOG_DEBUG(log, "Removed broken detached part {} due to a timeout for broken detached parts", old_name);
old_name.clear();
}
return renamed_parts.old_and_new_names.size();

View File

@ -96,6 +96,9 @@ def remove_broken_detached_part_impl(table, node, expect_broken_prefix):
assert "unexpected_all_42_1337_5" in result
time.sleep(15)
assert node.contains_in_log(
"Removed broken detached part unexpected_all_42_1337_5 due to a timeout"
)
result = node.exec_in_container(["ls", path_to_detached])
print(result)