Uh oh!
There was an error while loading. Please reload this page.
[feature](compute group) Support show compute groups in non cloud mode - #66697
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.
hello-stephen
commented
Aug 12, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
deardeng
commented
Aug 12, 2026
run buildall |
deardeng
commented
Aug 12, 2026
/review |
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.
Uh oh!
There was an error while loading. Please reload this page.
hello-stephen
commented
Aug 12, 2026
TPC-H: Total hot run time: 29200 ms |
hello-stephen
commented
Aug 12, 2026
TPC-DS: Total hot run time: 159504 ms |
hello-stephen
commented
Aug 12, 2026
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
deardeng
commented
Aug 13, 2026
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
### What problem does this PR solve? Issue Number: None Related PR: apache#66697 Problem Summary: The non-cloud compute group regression test connected a newly created ordinary user with the suite JDBC URL, which selects regression_test during authentication. The user intentionally has no database privileges, so the connection failed before SHOW COMPUTE GROUPS could verify resource-group visibility. Connect without a default database so the test reaches the command under test without adding unrelated privileges. ### Release note None ### Check List (For Author) - Test: Manual test - Verified an ordinary user is denied when connecting to regression_test and succeeds when connecting without a default database. - Regression test attempted; the running FE does not contain PR apache#66697 and rejects the initial SHOW COMPUTE GROUPS with ERR_NOT_CLOUD_MODE before the changed path. - Behavior changed: No (test-only connection setup) - Does this need documentation: No
deardeng
commented
Aug 17, 2026
run buildall |
deardeng
commented
Aug 18, 2026
run buildall |
hello-stephen
commented
Aug 18, 2026
TPC-H: Total hot run time: 17570 ms |
hello-stephen
commented
Aug 18, 2026
TPC-DS: Total hot run time: 83699 ms |
hello-stephen
commented
Aug 18, 2026
ClickBench: Total hot run time: 14.76 s |
hello-stephen
commented
Aug 19, 2026
FE Regression Coverage ReportIncrement line coverage |
PR approved by at least one committer and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
#66697) (#67298) pick from #66697 Expose resource groups as compute groups for SHOW CLUSTERS and SHOW COMPUTE GROUPS in non-cloud mode. (cherry picked from commit 788baa5) ### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
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)