mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Fix asan crash in PipelineExecutor.
This commit is contained in:
parent
72fea5bf97
commit
a9d41d580a
@ -590,17 +590,17 @@ void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads
|
||||
if (stream != IProcessor::NO_STREAM && dynamic_cast<const ISource *>(task->processor))
|
||||
{
|
||||
bool found_in_queue = false;
|
||||
auto thread_to_wake = stream % num_threads;
|
||||
|
||||
{
|
||||
std::unique_lock lock(task_queue_mutex);
|
||||
if (threads_queue.has(stream))
|
||||
if (threads_queue.has(thread_to_wake))
|
||||
{
|
||||
threads_queue.pop(stream);
|
||||
threads_queue.pop(thread_to_wake);
|
||||
found_in_queue = true;
|
||||
}
|
||||
}
|
||||
|
||||
auto thread_to_wake = stream % num_threads;
|
||||
std::lock_guard guard(executor_contexts[thread_to_wake]->mutex);
|
||||
executor_contexts[thread_to_wake]->pinned_tasks.push(task);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user