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 config 'enable_statistics_collect_profile' to enable profile for statistics collection #33815

Merged
merged 1 commit into from Oct 30, 2023

Conversation

liuyehcf
Copy link
Contributor

@liuyehcf liuyehcf commented Oct 27, 2023

Main work

This pr add additional config enable_statistics_collect_profile to control if the statistics collection query generate profile or not.

admin set frontend config ("enable_statistics_collect_profile" = "true");

Why NOT using session variable?

Because the statistics collection may be triggerred in many ways, like

  1. Manually invoke analyze through analyze statement, including both synchronously or asynchronously
  2. Automatically invoked at the first load operation for each table.
  3. Periodic statistics collection.

Some of the process do not have the session, so we cannot control it over a session variable. So a static config is introduced to handle this.

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

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

…e profile for statistics collection

Signed-off-by: liuyehcf <1559500551@qq.com>
@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell C 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@liuyehcf liuyehcf enabled auto-merge (squash) October 27, 2023 07:30
@github-actions
Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions
Copy link

[FE Incremental Coverage Report]

pass : 2 / 2 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/common/Config.java 1 1 100.00% []
🔵 com/starrocks/statistic/StatisticExecutor.java 1 1 100.00% []

@liuyehcf liuyehcf merged commit 4a609b5 into StarRocks:main Oct 30, 2023
63 of 68 checks passed
@github-actions
Copy link

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Oct 30, 2023
@github-actions
Copy link

@Mergifyio backport branch-3.1

@github-actions github-actions bot removed the 3.1 label Oct 30, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 30, 2023

backport branch-3.2

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Oct 30, 2023

backport branch-3.1

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 30, 2023
…e profile for statistics collection (#33815)

Signed-off-by: liuyehcf <1559500551@qq.com>
(cherry picked from commit 4a609b5)
mergify bot pushed a commit that referenced this pull request Oct 30, 2023
…e profile for statistics collection (#33815)

Signed-off-by: liuyehcf <1559500551@qq.com>
(cherry picked from commit 4a609b5)
wanpengfei-git pushed a commit that referenced this pull request Oct 31, 2023
…e profile for statistics collection (#33815)

Signed-off-by: liuyehcf <1559500551@qq.com>
(cherry picked from commit 4a609b5)
wanpengfei-git pushed a commit that referenced this pull request Oct 31, 2023
…e profile for statistics collection (#33815)

Signed-off-by: liuyehcf <1559500551@qq.com>
(cherry picked from commit 4a609b5)
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.

None yet

4 participants