Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Add big query error in audit log #49611

Merged

Conversation

ZiheLiu
Copy link
Contributor

@ZiheLiu ZiheLiu commented Aug 8, 2024

Why I'm doing:

When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:

Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • [] Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

Documentation PRs only:

If you are submitting a PR that adds or changes English documentation and have not
included Chinese documentation, then you can check the box to request GPT to translate the
English doc to Chinese. Please ensure to uncheck the Do not translate box if translation is needed.
The workflow will generate a new PR with the Chinese translation after this PR is merged.

  • Yes, translate English markdown files with GPT
  • Do not translate

s
Signed-off-by: zihe.liu <[email protected]>
satanson
satanson previously approved these changes Aug 8, 2024
Signed-off-by: zihe.liu <[email protected]>
Copy link

sonarcloud bot commented Aug 9, 2024

@@ -261,6 +261,10 @@ std::string Status::code_as_string() const {
return "Capaticy limit exceeded";
case TStatusCode::SHUTDOWN:
return "Shut down in progress";
case TStatusCode::BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED:
Copy link
Contributor

Choose a reason for hiding this comment

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

do you have to handle big query memory limit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

big_query_mem_limit is also handled by TStatusCode:MEM_LIMIT_EXCEEDED.

@dirtysalt
Copy link
Contributor

LGTM

Copy link

github-actions bot commented Aug 9, 2024

[FE Incremental Coverage Report]

pass : 9 / 9 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/http/HttpConnectProcessor.java 1 1 100.00% []
🔵 com/starrocks/qe/ConnectContext.java 6 6 100.00% []
🔵 com/starrocks/qe/ConnectProcessor.java 2 2 100.00% []

Copy link

github-actions bot commented Aug 9, 2024

[BE Incremental Coverage Report]

fail : 0 / 12 (00.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exec/workgroup/work_group.cpp 0 6 00.00% [237, 238, 239, 248, 249, 250]
🔵 be/src/common/status.h 0 2 00.00% [157, 160]
🔵 be/src/common/status.cpp 0 4 00.00% [264, 265, 266, 267]

@dirtysalt
Copy link
Contributor

@alvin-celerdata do you think it's okay to merge? it's hard to cover resource group code.

@dirtysalt dirtysalt enabled auto-merge (squash) August 9, 2024 12:12
@alvin-celerdata alvin-celerdata merged commit 2e68c7e into StarRocks:main Aug 9, 2024
62 of 66 checks passed
Copy link

github-actions bot commented Aug 9, 2024

@Mergifyio backport branch-3.3

@github-actions github-actions bot removed the 3.3 label Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

@Mergifyio backport branch-3.2

mergify bot pushed a commit that referenced this pull request Aug 9, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
(cherry picked from commit 2e68c7e)

# Conflicts:
#	be/src/common/status.cpp
#	be/src/common/status.h
#	gensrc/thrift/StatusCode.thrift
mergify bot pushed a commit that referenced this pull request Aug 9, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
(cherry picked from commit 2e68c7e)

# Conflicts:
#	be/src/common/status.cpp
#	be/src/common/status.h
#	fe/fe-core/src/test/java/com/starrocks/qe/ConnectContextTest.java
#	gensrc/thrift/StatusCode.thrift
mergify bot pushed a commit that referenced this pull request Aug 9, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
(cherry picked from commit 2e68c7e)

# Conflicts:
#	be/src/common/status.cpp
#	fe/fe-core/src/main/java/com/starrocks/http/HttpConnectProcessor.java
#	fe/fe-core/src/main/java/com/starrocks/qe/ConnectContext.java
#	fe/fe-core/src/test/java/com/starrocks/qe/ConnectContextTest.java
#	gensrc/thrift/StatusCode.thrift
mergify bot pushed a commit that referenced this pull request Aug 9, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
(cherry picked from commit 2e68c7e)

# Conflicts:
#	be/src/common/status.cpp
#	fe/fe-core/src/main/java/com/starrocks/http/HttpConnectProcessor.java
#	fe/fe-core/src/main/java/com/starrocks/qe/ConnectContext.java
#	fe/fe-core/src/test/java/com/starrocks/qe/ConnectContextTest.java
#	gensrc/thrift/StatusCode.thrift
mergify bot pushed a commit that referenced this pull request Aug 9, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
(cherry picked from commit 2e68c7e)

# Conflicts:
#	be/src/common/status.cpp
#	fe/fe-core/src/main/java/com/starrocks/http/HttpConnectProcessor.java
#	fe/fe-core/src/main/java/com/starrocks/qe/ConnectContext.java
#	fe/fe-core/src/test/java/com/starrocks/qe/ConnectContextTest.java
#	gensrc/thrift/StatusCode.thrift
ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Aug 14, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Aug 14, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Aug 14, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Aug 14, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Aug 14, 2024
Why I'm doing:
When exceeding the thredsholds of big_query_cpu_second_limit or big_query_scan_rows_limit, the query will be failed.
However, we don't know a query is killed by which big query thredsholds or other reasons.

What I'm doing:
Add BIG_QUERY_CPU_SECOND_LIMIT_EXCEEDED and BIG_QUERY_SCAN_ROWS_LIMIT_EXCEEDED to TStatusCode.

Signed-off-by: zihe.liu <[email protected]>
kangkaisen pushed a commit that referenced this pull request Aug 14, 2024
kangkaisen pushed a commit that referenced this pull request Aug 14, 2024
kangkaisen pushed a commit that referenced this pull request Aug 14, 2024
kangkaisen pushed a commit that referenced this pull request Aug 14, 2024
ZiheLiu added a commit that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants