Prevent abort on shutdown if the fs is readonly

This commit is contained in:
Alexey Milovidov 2020-02-13 16:15:54 +03:00
parent 0eade98688
commit b5c79201c3

View File

@ -108,7 +108,18 @@ void StorageMergeTree::shutdown()
if (shutdown_called)
return;
shutdown_called = true;
clearOldPartsFromFilesystem(true);
try
{
clearOldPartsFromFilesystem(true);
}
catch (...)
{
/// Example: the case of readonly filesystem, we have failure removing old parts.
/// Should not prevent table shutdown.
tryLogCurrentException(log);
}
merger_mutator.merges_blocker.cancelForever();
parts_mover.moves_blocker.cancelForever();