mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 09:40:49 +00:00
fixup
This commit is contained in:
parent
b1741dd87e
commit
da2a3fffe8
@ -822,7 +822,24 @@ void CacheDictionary::waitForCurrentUpdateFinish(UpdateUnitPtr & update_unit_ptr
|
|||||||
|
|
||||||
|
|
||||||
if (update_unit_ptr->current_exception)
|
if (update_unit_ptr->current_exception)
|
||||||
std::rethrow_exception(update_unit_ptr->current_exception);
|
{
|
||||||
|
// There might have been a single update unit for multiple callers in
|
||||||
|
// independent threads, and current_exception will be the same for them.
|
||||||
|
// Don't just rethrow it, because sharing the same exception object
|
||||||
|
// between multiple threads can lead to weird effects if they decide to
|
||||||
|
// modify it, for example, by adding some error context.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::rethrow_exception(update_unit_ptr->current_exception);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
throw DB::Exception(ErrorCodes::CACHE_DICTIONARY_UPDATE_FAIL,
|
||||||
|
"Dictionary update failed: {}",
|
||||||
|
getCurrentExceptionMessage(true /*with stack trace*/,
|
||||||
|
true /*check embedded stack trace*/));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CacheDictionary::tryPushToUpdateQueueOrThrow(UpdateUnitPtr & update_unit_ptr) const
|
void CacheDictionary::tryPushToUpdateQueueOrThrow(UpdateUnitPtr & update_unit_ptr) const
|
||||||
|
Loading…
Reference in New Issue
Block a user