mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
Merge pull request #48571 from azat/dict/hashed/uncaught-exception-fix
Fix uncaught exception in case of parallel loader for hashed dictionaries
This commit is contained in:
commit
93b8fc74ef
@ -114,9 +114,18 @@ public:
|
|||||||
|
|
||||||
~ParallelDictionaryLoader()
|
~ParallelDictionaryLoader()
|
||||||
{
|
{
|
||||||
for (auto & queue : shards_queues)
|
try
|
||||||
queue->clearAndFinish();
|
{
|
||||||
pool.wait();
|
for (auto & queue : shards_queues)
|
||||||
|
queue->clearAndFinish();
|
||||||
|
|
||||||
|
/// NOTE: It is OK to not pass the exception next, since on success finish() should be called which will call wait()
|
||||||
|
pool.wait();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
tryLogCurrentException(dictionary.log, "Exception had been thrown during parallel load of the dictionary");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user