Merge pull request #71379 from ClickHouse/backport/24.10/71364

Backport #71364 to 24.10: Add try catch to data part destructors
This commit is contained in:
robot-ch-test-poll1 2024-11-01 21:23:35 +04:00 committed by GitHub
commit b900c37bfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 2 deletions

View File

@ -229,8 +229,15 @@ bool MergeTreeDataPartCompact::isStoredOnRemoteDiskWithZeroCopySupport() const
}
MergeTreeDataPartCompact::~MergeTreeDataPartCompact()
{
try
{
removeIfNeeded();
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
}
}
}

View File

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