Merge pull request #9192 from nvartolomei/nv/format-version-file-typo

Fix typo in file name when reporting version file duplicates
This commit is contained in:
alexey-milovidov 2020-02-19 11:59:22 +03:00 committed by GitHub
commit c5d5c9c11e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,14 +196,15 @@ MergeTreeData::MergeTreeData(
{
Poco::File(path).createDirectories();
Poco::File(path + "detached").createDirectory();
if (Poco::File{path + "format_version.txt"}.exists())
auto current_version_file_path = path + "format_version.txt";
if (Poco::File{current_version_file_path}.exists())
{
if (!version_file_path.empty())
{
LOG_ERROR(log, "Duplication of version file " << version_file_path << " and " << path << "format_file.txt");
LOG_ERROR(log, "Duplication of version file " << version_file_path << " and " << current_version_file_path);
throw Exception("Multiple format_version.txt file", ErrorCodes::CORRUPTED_DATA);
}
version_file_path = path + "format_version.txt";
version_file_path = current_version_file_path;
}
}