mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 11:52:27 +00:00
Change behaviour of cancel in PipelineExecutor
This commit is contained in:
parent
76d6e2edf9
commit
1793730df8
@ -400,7 +400,9 @@ void ExecutingGraph::cancel()
|
||||
{
|
||||
try
|
||||
{
|
||||
processor->cancel();
|
||||
bool is_source = processor->getInputs().empty();
|
||||
if (is_source)
|
||||
processor->cancel();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
@ -70,7 +70,6 @@ const Processors & PipelineExecutor::getProcessors() const
|
||||
void PipelineExecutor::cancel()
|
||||
{
|
||||
cancelled = true;
|
||||
finish();
|
||||
graph->cancel();
|
||||
}
|
||||
|
||||
@ -147,7 +146,10 @@ bool PipelineExecutor::checkTimeLimitSoft()
|
||||
// We call cancel here so that all processors are notified and tasks waken up
|
||||
// so that the "break" is faster and doesn't wait for long events
|
||||
if (!continuing)
|
||||
{
|
||||
cancel();
|
||||
finish();
|
||||
}
|
||||
return continuing;
|
||||
}
|
||||
|
||||
@ -227,7 +229,10 @@ void PipelineExecutor::executeStepImpl(size_t thread_num, std::atomic_bool * yie
|
||||
break;
|
||||
|
||||
if (!context.executeTask())
|
||||
{
|
||||
cancel();
|
||||
finish();
|
||||
}
|
||||
|
||||
if (tasks.isFinished())
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user