mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
Revert some changes.
This commit is contained in:
parent
75a658c143
commit
c58643e04b
@ -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
|
/// In case of asynchronous distributed queries it is possible to call
|
||||||
/// addPipelineExecutor() from the cancelQuery() context, and this will
|
/// addPipelineExecutor() from the cancelQuery() context, and this will
|
||||||
/// lead to deadlock.
|
/// lead to deadlock.
|
||||||
|
UInt64 max_exec_time = getContext()->getSettingsRef()[Setting::max_execution_time].totalMilliseconds();
|
||||||
throwProperExceptionIfNeeded(max_exec_time);
|
throwProperExceptionIfNeeded(max_exec_time);
|
||||||
|
|
||||||
std::lock_guard lock(executors_mutex);
|
std::lock_guard lock(executors_mutex);
|
||||||
|
@ -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
|
// Add the pipeline to the QueryStatus at the end to avoid issues if other things throw
|
||||||
// as that would leave the executor "linked"
|
// 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);
|
||||||
process_list_element->addPipelineExecutor(this, max_exec_time);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user