Merge pull request #63298 from nickitat/fix_merge_tree_deduplication_log_shutdown

Fix terminate because of unhandled exception in `MergeTreeDeduplicationLog::shutdown`
This commit is contained in:
Nikita Taranov 2024-05-03 09:18:07 +00:00 committed by GitHub
commit 761c4b5696
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -341,21 +341,21 @@ void MergeTreeDeduplicationLog::shutdown()
stopped = true; stopped = true;
if (current_writer) if (current_writer)
{ {
current_writer->finalize(); try
{
current_writer->finalize();
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
}
current_writer.reset(); current_writer.reset();
} }
} }
MergeTreeDeduplicationLog::~MergeTreeDeduplicationLog() MergeTreeDeduplicationLog::~MergeTreeDeduplicationLog()
{ {
try shutdown();
{
shutdown();
}
catch (...)
{
tryLogCurrentException(__PRETTY_FUNCTION__);
}
} }
} }