Skip to content

[refactor](cloud) Rename cloud compute group metadata class#65817

Open
deardeng wants to merge 1 commit into
apache:masterfrom
deardeng:rename-cloud-cg
Open

[refactor](cloud) Rename cloud compute group metadata class#65817
deardeng wants to merge 1 commit into
apache:masterfrom
deardeng:rename-cloud-cg

Conversation

@deardeng

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The FE cloud catalog metadata entity shared the ComputeGroup class name with the resource routing abstraction, making imports and usages ambiguous. Rename the cloud metadata entity to CloudComputeGroupMeta and update all production and unit-test references without changing runtime behavior or persisted metadata.

Release note

None

Check List (For Author)

  • Test: Unit Test
    • ./run-fe-ut.sh --run org.apache.doris.cloud.catalog.CloudComputeGroupMetaTest,org.apache.doris.cloud.catalog.CloudInstanceStatusCheckerTest,org.apache.doris.cloud.system.CloudSystemInfoServiceTest,org.apache.doris.cloud.WarmUpClusterOnTablesParseTest,org.apache.doris.mysql.privilege.CloudAuthTest,org.apache.doris.nereids.trees.plans.commands.AlterComputeGroupCommandTest
    • cd fe && mvn checkstyle:check -pl fe-core
  • Behavior changed: No
  • Does this need documentation: No

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@deardeng

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@deardeng

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review result: no blocking or correctness issues found.

The rename is complete and narrowly scoped. All cloud catalog metadata constructions, accessors, nested types, constants, and consumers now use CloudComputeGroupMeta, while every remaining ComputeGroup type belongs explicitly to the separate resource-routing abstraction. Normalizing the identifier across the authoritative diff leaves only formatting changes; no runtime condition, RPC payload, property, error path, or test assertion changed.

Critical checkpoint conclusions:

  • Goal and tests: The PR removes the FE class-name ambiguity without changing behavior. The six updated FE test classes remain discoverable and cover metadata properties, physical/virtual group construction and synchronization, routing/failover helpers, warm-up validation, authorization, and ALTER validation. CheckStyle is green; COMPILE and FE UT are still pending. Per the automated-review contract, I performed static review only and did not run builds locally.
  • Scope and parallel paths: The change is focused on the renamed class and every tracked production/test reference. Both physical-group construction in CloudSystemInfoService and virtual-group construction in CloudInstanceStatusChecker, plus the rebalancer and all three changed Nereids commands, are updated consistently.
  • Concurrency and lifecycle: No thread entry, lock, lock order, shared-state operation, static initializer expression, ownership edge, or cleanup path changed.
  • Compatibility and persistence: CloudComputeGroupMeta is process-local, is not EditLog/image/Java-serialized, and is reconstructed from MetaService protobufs. No reflection, service-loader, plugin/extension, logging configuration, or tracked class-name reference uses the old FQCN; FE/BE and rolling-upgrade wire formats are unchanged.
  • Configuration, conditions, observability, and performance: No configuration, conditional behavior, transaction/data-write path, transmitted variable, log message/metric payload, allocation, scan, or hot-path work changed. The logger category follows the intentional class rename.

User focus: no additional review focus was provided.

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The FE cloud catalog metadata entity shared the ComputeGroup class name with the resource routing abstraction, making imports and usages ambiguous. Rename the cloud metadata entity to CloudComputeGroupMeta and update all production and unit-test references without changing runtime behavior or persisted metadata.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.cloud.catalog.CloudComputeGroupMetaTest,org.apache.doris.cloud.catalog.CloudInstanceStatusCheckerTest,org.apache.doris.cloud.system.CloudSystemInfoServiceTest,org.apache.doris.cloud.WarmUpClusterOnTablesParseTest,org.apache.doris.mysql.privilege.CloudAuthTest,org.apache.doris.nereids.trees.plans.commands.AlterComputeGroupCommandTest
    - cd fe && mvn checkstyle:check -pl fe-core
- Behavior changed: No
- Does this need documentation: No
@deardeng

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions Bot added approved Indicates a PR has been approved by one committer. reviewed labels Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29655 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit c29ab7bf2d1cac384228b53fbae11847414abf75, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17604	4016	3974	3974
q2	2013	321	195	195
q3	10315	1459	858	858
q4	4691	475	344	344
q5	7578	838	554	554
q6	201	167	136	136
q7	768	830	610	610
q8	10185	1630	1610	1610
q9	6243	4404	4393	4393
q10	6804	1815	1463	1463
q11	503	350	323	323
q12	739	578	467	467
q13	18131	3267	2761	2761
q14	265	265	238	238
q15	q16	795	773	705	705
q17	1034	1017	1118	1017
q18	6862	5720	5569	5569
q19	1454	1276	1119	1119
q20	805	704	591	591
q21	6000	2586	2431	2431
q22	432	355	297	297
Total cold run time: 103422 ms
Total hot run time: 29655 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4379	4285	4280	4280
q2	288	317	210	210
q3	4586	4952	4394	4394
q4	2078	2173	1359	1359
q5	4384	4237	4262	4237
q6	231	175	129	129
q7	2047	1976	1647	1647
q8	2517	2163	2135	2135
q9	7832	7820	7831	7820
q10	4671	4685	4227	4227
q11	568	416	377	377
q12	935	783	541	541
q13	3306	3524	3025	3025
q14	295	319	293	293
q15	q16	717	727	642	642
q17	1350	1344	1334	1334
q18	7964	7339	6954	6954
q19	1146	1080	1100	1080
q20	2248	2219	1950	1950
q21	5269	4564	4424	4424
q22	506	450	412	412
Total cold run time: 57317 ms
Total hot run time: 51470 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 178384 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit c29ab7bf2d1cac384228b53fbae11847414abf75, data reload: false

query5	4310	620	489	489
query6	457	219	221	219
query7	4948	629	348	348
query8	342	187	176	176
query9	8774	4112	4117	4112
query10	499	382	313	313
query11	5900	2326	2140	2140
query12	162	103	102	102
query13	1259	623	432	432
query14	6227	5204	4881	4881
query14_1	4241	4255	4246	4246
query15	223	208	180	180
query16	1012	486	459	459
query17	957	715	595	595
query18	2444	477	351	351
query19	213	193	150	150
query20	115	112	110	110
query21	238	163	140	140
query22	13618	13678	13403	13403
query23	17506	16561	16182	16182
query23_1	16251	16329	16181	16181
query24	7509	1764	1292	1292
query24_1	1321	1314	1296	1296
query25	568	462	401	401
query26	1330	370	212	212
query27	2577	638	392	392
query28	4456	1986	1941	1941
query29	1081	627	489	489
query30	343	266	233	233
query31	1119	1092	994	994
query32	106	64	61	61
query33	534	365	263	263
query34	1173	1167	658	658
query35	777	776	683	683
query36	1194	1185	1041	1041
query37	155	107	89	89
query38	1875	1708	1656	1656
query39	917	897	843	843
query39_1	829	846	849	846
query40	253	203	146	146
query41	65	68	64	64
query42	94	92	90	90
query43	326	322	273	273
query44	1435	780	767	767
query45	193	181	172	172
query46	1078	1223	724	724
query47	2108	2132	1949	1949
query48	412	436	300	300
query49	579	426	326	326
query50	1095	449	349	349
query51	10872	10997	10888	10888
query52	91	84	76	76
query53	261	279	202	202
query54	280	254	239	239
query55	75	70	69	69
query56	293	307	284	284
query57	1332	1286	1170	1170
query58	285	285	256	256
query59	1616	1676	1418	1418
query60	303	283	257	257
query61	154	150	154	150
query62	549	485	433	433
query63	230	204	204	204
query64	2853	1044	918	918
query65	4696	4630	4613	4613
query66	1812	491	383	383
query67	28640	29241	29017	29017
query68	3222	1592	1033	1033
query69	423	301	265	265
query70	1086	962	949	949
query71	367	344	335	335
query72	3078	2633	2359	2359
query73	830	758	415	415
query74	5077	4889	4719	4719
query75	2534	2521	2153	2153
query76	2321	1174	789	789
query77	357	385	277	277
query78	11821	11926	11371	11371
query79	1459	1180	770	770
query80	1316	562	479	479
query81	531	332	284	284
query82	599	155	118	118
query83	377	322	294	294
query84	324	162	132	132
query85	993	606	554	554
query86	424	294	264	264
query87	1828	1814	1748	1748
query88	3686	2808	2781	2781
query89	435	378	321	321
query90	1931	202	202	202
query91	201	197	161	161
query92	64	59	54	54
query93	1777	1487	960	960
query94	717	334	306	306
query95	777	592	502	502
query96	1027	735	357	357
query97	2637	2619	2501	2501
query98	214	203	201	201
query99	1067	1108	967	967
Total cold run time: 263452 ms
Total hot run time: 178384 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.05 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit c29ab7bf2d1cac384228b53fbae11847414abf75, data reload: false

query1	0.00	0.00	0.00
query2	0.09	0.08	0.04
query3	0.25	0.13	0.13
query4	1.61	0.14	0.12
query5	0.24	0.22	0.22
query6	1.26	1.06	1.08
query7	0.04	0.01	0.01
query8	0.05	0.03	0.04
query9	0.39	0.32	0.31
query10	0.56	0.56	0.55
query11	0.19	0.14	0.14
query12	0.18	0.14	0.14
query13	0.47	0.47	0.48
query14	1.02	1.01	1.00
query15	0.61	0.58	0.59
query16	0.31	0.33	0.32
query17	1.08	1.14	1.11
query18	0.23	0.21	0.20
query19	2.00	1.98	2.01
query20	0.02	0.01	0.01
query21	15.42	0.21	0.15
query22	4.86	0.05	0.05
query23	16.12	0.32	0.12
query24	2.99	0.41	0.32
query25	0.11	0.04	0.04
query26	0.74	0.21	0.14
query27	0.05	0.04	0.03
query28	3.52	0.88	0.52
query29	12.47	4.09	3.28
query30	0.26	0.15	0.14
query31	2.77	0.59	0.32
query32	3.22	0.59	0.48
query33	3.24	3.24	3.22
query34	15.52	4.22	3.53
query35	3.49	3.55	3.51
query36	0.54	0.43	0.42
query37	0.08	0.07	0.06
query38	0.04	0.03	0.04
query39	0.04	0.03	0.03
query40	0.18	0.17	0.15
query41	0.08	0.03	0.03
query42	0.04	0.04	0.02
query43	0.04	0.04	0.04
Total cold run time: 96.42 s
Total hot run time: 25.05 s

@morningman

Copy link
Copy Markdown
Contributor

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review opinion: approve (comment-only review). I found no actionable correctness issue in the reviewed patch.

Critical checkpoint conclusions:

  • Goal and proof: the PR disambiguates the FE cloud control-plane metadata type from the resource-layer routing ComputeGroup. All in-repository production and test consumers move to CloudComputeGroupMeta, while the routing abstraction remains unchanged. Live CI reports Compile, FE UT, and CheckStyle passing.
  • Scope and clarity: the change is focused on one production class/test rename, declared-type/import/nested-type/constant substitutions, formatting required by the longer name, and explanatory Javadoc. No unrelated runtime logic is changed.
  • Concurrency: the existing CloudSystemInfoService read/write lock, concurrent maps, status-checker daemon, rebalancer, and query/failover interactions are unchanged; no lock, shared variable, thread entry, or lock ordering is added or modified.
  • Lifecycle/static initialization: physical metadata is reconstructed during backend refresh/replay and virtual metadata from meta-service ClusterPB responses. No new lifecycle edge, ownership cycle, or static initialization dependency is introduced.
  • Configuration: no configuration item or dynamic-update behavior is added or changed.
  • Compatibility: no protobuf, FE-BE variable, RPC, image/EditLog, storage format, or rolling-upgrade contract changes. The renamed class is not Writable/Java-serializable, is not registered in persisted Gson/class-tag paths, and is not part of the repository's plugin SPI; searches found no reflective/string consumer of the old cloud FQCN.
  • Parallel paths and conditions: physical/virtual lookup, active-standby failover, cache warm-up, tablet rebalancing, privilege handling, and ALTER/SHOW/WARM UP command paths are all updated consistently. No behavioral condition or error path changes.
  • Tests and expected results: the renamed test still matches standard *Test discovery, all six changed test files use the new type, and the PR's targeted test list covers them. Live FE UT is passing. The separate check_coverage_fe (Coverage) status is currently failing; its TeamCity log requires authentication and GitHub exposes no diagnostic, so this review cannot attribute it to a concrete code defect and does not claim an all-green matrix.
  • Observability: only the expected logger category changes with the class name; no old class-specific logging configuration exists, and no new logs/metrics are needed for a behavior-neutral rename.
  • Transactions, persistence, and data writes: no transaction or user-data write path changes. Meta-service protobuf state remains the source of truth for virtual metadata, and persisted backend replay reconstructs physical metadata without Java class identity.
  • Performance: operations, allocation patterns, lookup complexity, lock scope, and RPC behavior are unchanged.
  • Other issues: repository-wide old-name/source/test/build/discovery searches and the final 14-file sweep found no missed consumer, accidental routing-type replacement, unresolved candidate, or inline-comment-worthy issue.

User focus: no additional focus was provided; the complete PR was reviewed.

Validation note: this automated review was static, as the runner contract forbids local builds. Round 1 converged with both normal full-review agents and the separate risk-focused agent returning NO_NEW_VALUABLE_FINDINGS against the same final ledger/comment set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.1.x dev/4.0.x dev/4.1.x reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants