Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions be/src/runtime/plan_fragment_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,21 +487,22 @@ Status PlanFragmentExecutor::get_next_internal(RowBatch** batch) {
return Status::OK();
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only rename status to new_status?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See changes in line 497 if (_status.ok())

void PlanFragmentExecutor::update_status(const Status& status) {
if (status.ok()) {
void PlanFragmentExecutor::update_status(const Status& new_status) {
if (new_status.ok()) {
return;
}

{
boost::lock_guard<boost::mutex> l(_status_lock);
if (!_status.ok()) {
if (status.is_mem_limit_exceeded()) {
_runtime_state->set_mem_limit_exceeded(status.get_error_msg());
// if current `_status` is ok, set it to `new_status` to record the error.
if (_status.ok()) {
if (new_status.is_mem_limit_exceeded()) {
_runtime_state->set_mem_limit_exceeded(new_status.get_error_msg());
}
_status = status;
_status = new_status;
if (_runtime_state->query_options().query_type == TQueryType::EXTERNAL) {
TUniqueId fragment_instance_id = _runtime_state->fragment_instance_id();
_exec_env->result_queue_mgr()->update_queue_status(fragment_instance_id, status);
_exec_env->result_queue_mgr()->update_queue_status(fragment_instance_id, new_status);
}
}
}
Expand Down