[feature](compute group) Support show compute groups in non cloud mode - #66697
Open
deardeng wants to merge 2 commits into
Open
[feature](compute group) Support show compute groups in non cloud mode#66697deardeng wants to merge 2 commits into
deardeng wants to merge 2 commits into
Conversation
SHOW CLUSTERS / SHOW COMPUTE GROUPS were rejected with ERR_NOT_CLOUD_MODE in non cloud mode. In non cloud mode a resource group (the backend location tag) is the counterpart of a cloud compute group, so show it instead: - only Name/BackendNum (cluster/backend_num for SHOW CLUSTERS) are shown, IsCurrent/Users/SubComputeGroups/Policy/Properties are cloud only. - a user only sees the resource groups it is allowed to use, which is the compute group resolved from resource_tags.location, the same visibility the query engine uses to pick backends. This replaces the global ADMIN check, and matches cloud mode where clusters are filtered by usage priv.
deardeng
requested review from
924060929,
englefly,
morrySnow and
starocean999
as code owners
August 12, 2026 11:23
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
/review |
Contributor
There was a problem hiding this comment.
Request changes: add an exact BackendNum regression fence for the new non-cloud branch.
Critical checkpoint conclusions:
- Goal and scope: The production change is small and focused, and the traced implementation achieves the stated goal: both
SHOW CLUSTERSandSHOW COMPUTE GROUPSexpose non-cloud location-tag groups with mode-appropriate two-column metadata. The central new exact count is not proved by the changed tests, as described inline. - Data correctness and authorization: Direct MySQL, forwarded, and fallback contexts resolve the same
ComputeGroupmembership used by query scheduling. Default, single-tag, multi-tag, root/admin all-backend, and invalid groups were traced; no extra group exposure, dropped allowed group, or throwing subtype path was found. Resource tags are scheduling/QoS hints rather than a tenant-isolation boundary under the repository threat model. - Concurrency, lifecycle, and error handling: The command reads one copy-on-write backend membership snapshot, adds no locks or heavy work under locks, and introduces no new lifecycle/static-initialization or silent-error path. Per-backend tag changes retain the existing non-atomic DDL observation semantics.
- Compatibility and parallel paths: The cloud row construction and USAGE filtering remain unchanged. Both SQL spellings, direct/proxy result handling, mode-dependent metadata widths, all registered backend roles/states, and the existing cloud count semantics were checked; no FE/BE protocol, persistence, transaction, configuration, storage-format, or rolling-upgrade surface is introduced.
- Tests: The new regression covers both spellings, authenticated single-tag filtering, invalid-tag emptiness, row width, and deterministic order. Existing unit coverage exercises the unchanged compute-group subtype primitives. However, every changed count assertion still passes for a constant positive value, and the FE test starts only one backend, so a same-tag multi-backend exact total is required to prove the new
groupingBy(..., counting())behavior. - Performance and observability: The new work is one backend scan plus group sorting, with no material hot-path or memory concern. Existing diagnostics are sufficient for this local metadata operation.
No additional user-provided review focus was supplied. The review converged after two full rounds: all Round 2 reviewers returned NO_NEW_VALUABLE_FINDINGS; one inline issue was accepted, and the other candidates were dismissed with concrete test-runner and existing-coverage evidence.
No local build or test was run because the authoritative review instructions prohibit builds in this runner.
Contributor
TPC-H: Total hot run time: 29200 ms |
Contributor
TPC-DS: Total hot run time: 159504 ms |
Contributor
ClickBench: Total hot run time: 23.89 s |
### What problem does this PR solve? Issue Number: None Related PR: apache#66697 Problem Summary: The non-cloud SHOW CLUSTERS and SHOW COMPUTE GROUPS tests only checked positive backend counts with a single backend, so they could not detect incorrect aggregation when multiple backends shared a location tag. Add deterministic FE unit coverage and a three-backend Docker regression that splits backends across multiple location groups and verifies exact counts for both SHOW forms. ### Release note None ### Check List (For Author) - Test: - Unit Test: ./run-fe-ut.sh --run org.apache.doris.nereids.trees.plans.commands.ShowComputeGroupTest - Regression test: ./run-regression-test.sh --run -d show_p0 -s test_show_compute_groups_docker -runMode not_cloud - Behavior changed: No - Does this need documentation: No
Contributor
Author
|
run buildall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SHOW CLUSTERS / SHOW COMPUTE GROUPS were rejected with ERR_NOT_CLOUD_MODE in non cloud mode. In non cloud mode a resource group (the backend location tag) is the counterpart of a cloud compute group, so show it instead:
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)