Merge pull request #71364 from ClickHouse/add_try_catch_to_destructors

Add try catch to data part destructors
This commit is contained in:
alesapin 2024-11-01 13:45:51 +00:00 committed by GitHub
commit bda6ff33a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 2 deletions

View File

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

View File

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