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] Avoid checking group concurrency_limit when enabling group level queue #34398

Conversation

ZiheLiu
Copy link
Contributor

@ZiheLiu ZiheLiu commented Nov 6, 2023

When enabling group level query queue,

  1. The concurrency_limit is checked in both FE and BE
    a. FE will queue the coming queries, when num_running_queries == concurrency_limit.
    b. BE will fail the coming queries, when num_running_queries == concurrency_limit.
  2. The order between decreasing num_running_queries in FE and BE are uncertain.
    a. FE decreases num_running_queries, when it receives EOS RPC from BE.
    b. BE decreases num_running_queries, when it finalizes the query context (after sending EOS RPC to FE asynchronously).

Therefore, num_running_queries in BE may be greater than that in FE. This results in that the query is admitted by FE but still failed by exceeding the concurrency limit in BE, even though the group level query queue is enabled. This is not intuitive.

Thus, to make the judgement of exceeding the concurrency limit in FE and BE consistent, when enabling group level query queue, BE doesn't check it anymore.

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

…oup level queue

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Copy link

sonarqubecloud bot commented Nov 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Nov 6, 2023
…oup level queue (StarRocks#34398)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
ZiheLiu added a commit that referenced this pull request Nov 6, 2023
…oup level queue (#34398) (#34434)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Copy link

github-actions bot commented Nov 6, 2023

[FE Incremental Coverage Report]

pass : 41 / 47 (87.23%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/qe/scheduler/TFragmentInstanceFactory.java 1 6 16.67% [155, 156, 157, 159, 160]
🔵 com/starrocks/qe/scheduler/dag/JobSpec.java 38 39 97.44% [436]
🔵 com/starrocks/qe/QueryQueueManager.java 2 2 100.00% []

Copy link

github-actions bot commented Nov 6, 2023

[BE Incremental Coverage Report]

fail : 6 / 13 (46.15%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/exec/pipeline/fragment_executor.cpp 0 7 00.00% [196, 197, 198, 199, 200, 201, 203]
🔵 src/exec/workgroup/work_group.cpp 3 3 100.00% []
🔵 src/exec/pipeline/query_context.cpp 3 3 100.00% []

@murphyatwork murphyatwork merged commit 5d15398 into StarRocks:main Nov 7, 2023
Copy link

github-actions bot commented Nov 7, 2023

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Nov 7, 2023
Copy link

github-actions bot commented Nov 7, 2023

@Mergifyio backport branch-3.1

@github-actions github-actions bot removed the 3.1 label Nov 7, 2023
Copy link
Contributor

mergify bot commented Nov 7, 2023

backport branch-3.2

✅ Backports have been created

Copy link
Contributor

mergify bot commented Nov 7, 2023

backport branch-3.1

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 7, 2023
…oup level queue (#34398)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
(cherry picked from commit 5d15398)
mergify bot pushed a commit that referenced this pull request Nov 7, 2023
…oup level queue (#34398)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
(cherry picked from commit 5d15398)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/qe/QueryQueueManager.java
#	fe/fe-core/src/main/java/com/starrocks/qe/scheduler/TFragmentInstanceFactory.java
#	fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java
#	fe/fe-core/src/test/java/com/starrocks/qe/scheduler/QueryQueueManagerTest.java
ZiheLiu added a commit to ZiheLiu/starrocks that referenced this pull request Nov 7, 2023
…oup level queue (StarRocks#34398)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
kangkaisen pushed a commit that referenced this pull request Nov 7, 2023
…oup level queue (backport #34398) (#34479)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: ZiheLiu <ziheliu1024@gmail.com>
wanpengfei-git pushed a commit that referenced this pull request Nov 7, 2023
…oup level queue (#34398)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
(cherry picked from commit 5d15398)
GavinMar pushed a commit to GavinMar/starrocks that referenced this pull request Nov 8, 2023
…oup level queue (StarRocks#34398) (StarRocks#34434)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
GavinMar pushed a commit to GavinMar/starrocks that referenced this pull request Jan 3, 2024
…oup level queue (StarRocks#34398) (StarRocks#34434)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
mergify bot pushed a commit that referenced this pull request Jan 12, 2024
…oup level queue (backport #34398) (#34479)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: ZiheLiu <ziheliu1024@gmail.com>
(cherry picked from commit 1dcb2b1)

# Conflicts:
#	gensrc/thrift/InternalService.thrift
luohaha added a commit to luohaha/starrocks that referenced this pull request Jan 12, 2024
…oup level queue (backport StarRocks#34398)

Signed-off-by: luohaha <18810541851@163.com>
luohaha pushed a commit to luohaha/starrocks that referenced this pull request Jan 12, 2024
…oup level queue (backport StarRocks#34398) (StarRocks#34479)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: ZiheLiu <ziheliu1024@gmail.com>
luohaha pushed a commit to luohaha/starrocks that referenced this pull request Jan 13, 2024
…oup level queue (backport StarRocks#34398) (StarRocks#34479)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
Signed-off-by: ZiheLiu <ziheliu1024@gmail.com>
andyziye pushed a commit that referenced this pull request Jan 13, 2024
…oup level queue (backport #34398) (#34479) (#39027)

Signed-off-by: zihe.liu <ziheliu1024@gmail.com>
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