Backport #71364 to 24.8: Add try catch to data part destructors

This commit is contained in:
robot-clickhouse 2024-11-01 15:07:58 +00:00
parent f3d4236ce2
commit 1e1ef4d002
2 changed files with 16 additions and 2 deletions

View File

@ -232,7 +232,14 @@ bool MergeTreeDataPartCompact::isStoredOnRemoteDiskWithZeroCopySupport() const
MergeTreeDataPartCompact::~MergeTreeDataPartCompact()
{
removeIfNeeded();
try
{
removeIfNeeded();
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
}
}
}

View File

@ -195,7 +195,14 @@ bool MergeTreeDataPartWide::isStoredOnRemoteDiskWithZeroCopySupport() const
MergeTreeDataPartWide::~MergeTreeDataPartWide()
{
removeIfNeeded();
try
{
removeIfNeeded();
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
}
}
void MergeTreeDataPartWide::doCheckConsistency(bool require_part_metadata) const