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:
Alexey Milovidov 2023-04-10 23:11:01 +03:00 committed by GitHub
commit 93b8fc74ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,11 +113,20 @@ public:
}
~ParallelDictionaryLoader()
{
try
{
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:
HashedDictionary & dictionary;