mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 02:53:38 +00:00
Fix possible deadlock with allow_asynchronous_read_from_io_pool_for_merge_tree in case of exception from ThreadPool::schedule
This commit is contained in:
parent
c7d12564cb
commit
dcd84c152a
@ -104,7 +104,16 @@ struct MergeTreeSource::AsyncReadingState
|
||||
|
||||
void schedule(ThreadPool::Job job)
|
||||
{
|
||||
callback_runner(std::move(job), 0);
|
||||
try
|
||||
{
|
||||
callback_runner(std::move(job), 0);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
/// Roll back stage in case of exception from ThreadPool::schedule
|
||||
control->stage = Stage::NotStarted;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
ChunkAndProgress getResult()
|
||||
|
Loading…
Reference in New Issue
Block a user