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] Support profile for only big query (2) (backport #39855) #40210

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

ZiheLiu
Copy link
Contributor

@ZiheLiu ZiheLiu commented Jan 29, 2024

This is cherry-picked from #39855.

Why I'm doing:

In the previous pr #33825, we've supported the profile only for big query with the session variable big_query_profile_second_threshold

Unfortunately, for some of our uses, most of the queries can be done within 200ms with a latency spike over 400ms, we cannot catch the slow query(400ms) with the session variable mentioned above.

What I'm doing & Behavior Change

  • Remove session variable big_query_profile_second_threshold with type int.
  • Add session variable big_query_profile_threshold with type string, it can support time duration like 1s/500ms/15m etc.

This change won't lead to compatible problem when performing grey upgrading.

  • Only upgrade some of the backends, it works fine with the previous session variable big_query_profile_second_threshold.
  • Only upgrade all of the backends, it works fine with the previous session variable big_query_profile_second_threshold
  • And after upgrading the frontend, the user need to set up the big_query_profile_threshold corresponding to the previous configuration manually.

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.2
    • 3.1
    • 3.0
    • 2.5

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 29, 2024
Signed-off-by: zihe.liu <[email protected]>
Copy link

sonarcloud bot commented Jan 29, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

[FE Incremental Coverage Report]

fail : 15 / 34 (44.12%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/qe/ConnectContext.java 0 1 00.00% [574]
🔵 com/starrocks/sql/analyzer/SetStmtAnalyzer.java 1 5 20.00% [229, 230, 231, 232]
🔵 com/starrocks/monitor/unit/TimeValue.java 10 23 43.48% [248, 250, 258, 259, 260, 261, 262, 263, 264, 265, 267, 269, 270]
🔵 com/starrocks/qe/SessionVariable.java 4 5 80.00% [1741]

Copy link

[BE Incremental Coverage Report]

fail : 0 / 12 (00.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/exec/pipeline/fragment_executor.cpp 0 2 00.00% [137, 138]
🔵 src/exec/pipeline/query_context.h 0 10 00.00% [103, 105, 106, 107, 108, 111, 112, 113, 119, 125]

@kangkaisen kangkaisen merged commit 55ba100 into StarRocks:branch-3.1 Jan 29, 2024
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation version:3.1.8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants