mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
Disk empty name fix
This commit is contained in:
parent
407af64280
commit
1f3701d485
@ -895,7 +895,7 @@ void MergeTreeData::loadDataParts(bool skip_sanity_checks)
|
||||
for (const auto it = disk->iterateDirectory(relative_data_path); it->isValid(); it->next())
|
||||
{
|
||||
if (MergeTreePartInfo::tryParsePartName(it->name(), format_version))
|
||||
throw Exception(ErrorCodes::UNKNOWN_DISK,
|
||||
throw Exception(ErrorCodes::UNKNOWN_DISK,
|
||||
"Part {} was found on disk {} which is not defined in the storage policy",
|
||||
backQuote(it->name()), backQuote(disk_name));
|
||||
}
|
||||
@ -3569,8 +3569,10 @@ std::vector<DetachedPartInfo> MergeTreeData::getDetachedParts() const
|
||||
{
|
||||
for (auto it = disk->iterateDirectory(detached_path); it->isValid(); it->next())
|
||||
{
|
||||
auto res_it = res.emplace_back(DetachedPartInfo::parseDetachedPartName(it->name(), format_version));
|
||||
res_it.disk = disk->getName();
|
||||
auto part = DetachedPartInfo::parseDetachedPartName(it->name(), format_version);
|
||||
part.disk = disk->getName();
|
||||
|
||||
res.push_back(std::move(part));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ struct DetachedPartInfo : public MergeTreePartInfo
|
||||
/// If false, MergeTreePartInfo is in invalid state (directory name was not successfully parsed).
|
||||
bool valid_name;
|
||||
|
||||
static constexpr auto DETACH_REASONS = std::to_array<std::string_view>({
|
||||
static constexpr auto DETACH_REASONS = std::to_array<std::string_view>({
|
||||
"broken", "unexpected", "noquorum",
|
||||
"ignored", "broken-on-start", "clone",
|
||||
"attaching", "deleting", "tmp-fetch"
|
||||
|
Loading…
Reference in New Issue
Block a user