Revert some changes.

This commit is contained in:
Yarik Briukhovetskyi 2024-10-31 16:19:41 +01:00 committed by GitHub
parent 75a658c143
commit c58643e04b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -504,11 +504,12 @@ void QueryStatus::throwProperExceptionIfNeeded(const UInt64 & max_execution_time
}
}
void QueryStatus::addPipelineExecutor(PipelineExecutor * e, UInt64 max_exec_time)
void QueryStatus::addPipelineExecutor(PipelineExecutor * e)
{
/// In case of asynchronous distributed queries it is possible to call
/// addPipelineExecutor() from the cancelQuery() context, and this will
/// lead to deadlock.
UInt64 max_exec_time = getContext()->getSettingsRef()[Setting::max_execution_time].totalMilliseconds();
throwProperExceptionIfNeeded(max_exec_time);
std::lock_guard lock(executors_mutex);

View File

@ -68,8 +68,7 @@ PipelineExecutor::PipelineExecutor(std::shared_ptr<Processors> & processors, Que
{
// Add the pipeline to the QueryStatus at the end to avoid issues if other things throw
// as that would leave the executor "linked"
UInt64 max_exec_time = process_list_element->getContext()->getSettingsRef()[Setting::max_execution_time].totalMilliseconds();
process_list_element->addPipelineExecutor(this, max_exec_time);
process_list_element->addPipelineExecutor(this);
}
}