Skip to content

Unify the msg of 'Memory exceed limit' - #1737

Merged
imay merged 3 commits into
apache:masterfrom
EmmyMiao87:memory_limit_msg
Sep 3, 2019
Merged

Unify the msg of 'Memory exceed limit'#1737
imay merged 3 commits into
apache:masterfrom
EmmyMiao87:memory_limit_msg

Conversation

@EmmyMiao87

Copy link
Copy Markdown
Contributor

The new msg of limit exceed: "Memory exceed limit. %msg, Backend:%ip, fragment:%id Used:% , Limit:%. xxx".
This commit unifies the msg of 'Memory exceed limit' such as check_query_state, RETURN_IF_LIMIT_EXCEEDED and LIMIT_EXCEEDED.

The new msg of limit exceed: "Memory exceed limit. %msg, Backend:%ip, fragment:%id Used:% , Limit:%. xxx".
This commit unifies the msg of 'Memory exceed limit' such as check_query_state, RETURN_IF_LIMIT_EXCEEDED and LIMIT_EXCEEDED.
Comment threadbe/src/exec/sort_node.cpp Outdated
"Sort node was getting next from the child.");
std::stringstream msg;
msg << "Sort, while getting next from the child.";
RETURN_IF_LIMIT_EXCEEDED(state, msg.str());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
RETURN_IF_LIMIT_EXCEEDED(state, msg.str());
RETURN_IF_LIMIT_EXCEEDED(state, "Sort, while getting next from the child.");

RETURN_IF_ERROR(state->check_query_state());
std::stringstream msg;
msg << "Partitioned aggregation, while getting next from child 0.";
RETURN_IF_ERROR(state->check_query_state(msg.str()));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
RETURN_IF_ERROR(state->check_query_state(msg.str()));
RETURN_IF_ERROR(state->check_query_state("Partitioned aggregation, while getting next from child 0."));

if (_status.ok()) {
if (status.is_mem_limit_exceeded()) {
_runtime_state->set_mem_limit_exceeded();
_runtime_state->set_mem_limit_exceeded(status.get_error_msg());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
_runtime_state->set_mem_limit_exceeded(status.get_error_msg());
_runtime_state->set_mem_limit_exceeded(status.to_string());

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

set_mem_limit_exceeded already set the code of MemoryLimitExceeded

}
std::stringstream msg;
msg << "Buffered block mgr, while getting new block";
RETURN_IF_LIMIT_EXCEEDED(_state, msg.str());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need to use stringstream

imay
imay approved these changes Sep 3, 2019
@imay
imay merged commit 9f5e571 into apache:masterSep 3, 2019
@imayimay mentioned this pull request Sep 26, 2019
swjtu-zhanglei pushed a commit to swjtu-zhanglei/incubator-doris that referenced this pull request Jul 25, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@EmmyMiao87@imay