Make drop table a little bit more robust

This commit is contained in:
Amos Bird 2020-08-13 22:22:04 +08:00
parent 89b712a180
commit 3b92692458
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4

View File

@ -1252,7 +1252,16 @@ void MergeTreeData::dropAllData()
clearPartsFromFilesystem(all_parts);
for (const auto & [path, disk] : getRelativeDataPathsWithDisks())
disk->removeRecursive(path);
{
try
{
disk->removeRecursive(path);
}
catch (const Poco::FileNotFoundException &)
{
/// If the file is already deleted, do nothing.
}
}
LOG_TRACE(log, "dropAllData: done.");
}