mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +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
@ -103,9 +103,18 @@ struct MergeTreeSource::AsyncReadingState
|
||||
}
|
||||
|
||||
void schedule(ThreadPool::Job job)
|
||||
{
|
||||
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