Fix test_encrypted_disk

This commit is contained in:
Nikolai Kochetov 2022-06-15 11:42:59 +00:00
parent a274bec0fa
commit 2ee349f29c

View File

@ -1162,16 +1162,9 @@ void IMergeTreeDataPart::loadColumns(bool require)
bool exists = metadata_manager->exists("columns.txt"); bool exists = metadata_manager->exists("columns.txt");
if (!exists) if (!exists)
{ {
auto & manager_ref = *metadata_manager;
if ((require || part_type == Type::Compact) && !data_part_storage->exists("columns.txt"))
throw Exception("No columns.txt in part (data_part_storage) " + name + ", expected path " + path + " on drive " + data_part_storage->getName() +
" manager " + demangle(typeid(manager_ref).name()),
ErrorCodes::NO_FILE_IN_DATA_PART);
/// We can get list of columns only from columns.txt in compact parts. /// We can get list of columns only from columns.txt in compact parts.
if (require || part_type == Type::Compact) if (require || part_type == Type::Compact)
throw Exception("No columns.txt in part " + name + ", expected path " + path + " on drive " + data_part_storage->getName() + throw Exception("No columns.txt in part " + name + ", expected path " + path + " on drive " + data_part_storage->getName(),
" manager " + demangle(typeid(manager_ref).name()),
ErrorCodes::NO_FILE_IN_DATA_PART); ErrorCodes::NO_FILE_IN_DATA_PART);
/// If there is no file with a list of columns, write it down. /// If there is no file with a list of columns, write it down.