mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
Ignore only ErrnoException/fs::filesystem_error while moving parts to detached
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
4f6c0c0b54
commit
f51050d2c9
@ -2033,7 +2033,23 @@ void IMergeTreeDataPart::renameToDetached(const String & prefix, bool ignore_err
|
||||
{
|
||||
renameTo(path_to_detach.value(), true);
|
||||
}
|
||||
catch (...)
|
||||
/// This exceptions majority of cases:
|
||||
/// - fsync
|
||||
/// - mtime adjustment
|
||||
catch (const ErrnoException &)
|
||||
{
|
||||
if (ignore_error)
|
||||
{
|
||||
// Don't throw when the destination is to the detached folder. It might be able to
|
||||
// recover in some cases, such as fetching parts into multi-disks while some of the
|
||||
// disks are broken.
|
||||
tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
}
|
||||
else
|
||||
throw;
|
||||
}
|
||||
/// - rename
|
||||
catch (const fs::filesystem_error &)
|
||||
{
|
||||
if (ignore_error)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user