Skip to content

Conversation

@EmmyMiao87
Copy link
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.
"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
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
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
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
Contributor Author

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
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 merged commit 9f5e571 into apache:master Sep 3, 2019
@imay imay 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 free to 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