Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
  • Loading branch information
windtalker committed Sep 27, 2022
1 parent bf77528 commit 045c6dc
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions dbms/src/Interpreters/executeQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,25 @@ std::tuple<ASTPtr, BlockIO> executeQueryImpl(
{
/// for MPPTask, process list entry is created in MPPTask::prepare()
RUNTIME_ASSERT(context.getDAGContext()->getProcessListEntry() != nullptr, "process list entry for MPP task must not be nullptr");
process_list_entry = context.getDAGContext()->getProcessListEntry();
}
else if (context.getDAGContext()->getProcessListEntry() == nullptr)
else
{
process_list_entry = context.getProcessList().insert(
query,
ast.get(),
context.getClientInfo(),
settings);
/// it is possible that in test mode, the process list entry is nullptr because some tests run mpp query
/// just based on dag request, there is even no MPPTask at all.
if (context.getDAGContext()->getProcessListEntry() == nullptr)
{
process_list_entry = context.getProcessList().insert(
query,
ast.get(),
context.getClientInfo(),
settings);

context.setProcessListElement(&process_list_entry->get());
context.setProcessListElement(&process_list_entry->get());
}
else
process_list_entry = context.getDAGContext()->getProcessListEntry();
}
else
process_list_entry = context.getDAGContext()->getProcessListEntry();
}

FAIL_POINT_TRIGGER_EXCEPTION(FailPoints::random_interpreter_failpoint);
Expand Down

0 comments on commit 045c6dc

Please sign in to comment.