Skip to content

[fix](be) Use ConfigValidatorTest fixture consistently - #69009

Merged
suxiaogang223 merged 1 commit into
apache:masterfrom
suxiaogang223:codex/fix-config-validator-test-fixture
Oct 13, 2026
Merged

suxiaogang223 merged 1 commit into
apache:masterfrom
suxiaogang223:codex/fix-config-validator-test-fixture

Conversation

@suxiaogang223

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: None

Related PR: #67228

Problem Summary:

PR #67228 added LookupConnectionCacheBlockPoolSize with TEST to the existing ConfigValidatorTest suite, while the suite already uses TEST_F. GoogleTest requires all tests in a suite to use the same fixture declaration and fails during test registration:

All tests in the same test suite must use the same test fixture

Change the new case to TEST_F so it uses the existing fixture consistently.

Release note

None

Check List (For Author)

  • Test: No need to test (one-line GoogleTest fixture declaration correction)
  • Behavior changed: No
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: apache#67228

Problem Summary: PR apache#67228 added a TEST case to the existing ConfigValidatorTest suite, whose other test uses TEST_F. GoogleTest requires every test in one suite to use the same fixture declaration and rejects the mixed TEST/TEST_F suite during registration. Use TEST_F for the added case as well.

### Release note

None

### Check List (For Author)

- Test: No need to test (one-line GoogleTest fixture declaration correction)
- Behavior changed: No
- Does this need documentation: No
@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?

@suxiaogang223

Copy link
Copy Markdown
Member Author

run buildall

@suxiaogang223

Copy link
Copy Markdown
Member 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.

Review complete for head f4d1a16. No actionable findings or existing blocking inline comments were found.

The one-line change makes LookupConnectionCacheBlockPoolSize use the same ConfigValidatorTest fixture as Validator, correcting the mixed TEST/TEST_F fixture identity. This follows the exact GoogleTest 1.12.1 macro definitions and fixture consistency/lifecycle implementation.

Critical checkpoint conclusions:

  1. Goal and evidence: the two tests now use the same fixture type; the existing lookup-validator assertions can execute with that fixture. This conclusion is based on static code inspection, not an executed test result.
  2. Scope: the single macro replacement is small, clear, and focused, reusing the adjacent fixture.
  3. Concurrency/locking: no new thread or lock is introduced. The standard runner invokes one test binary; fixture hooks execute per test. Existing configuration mutation is serialized and the getter reads its atomic snapshot.
  4. Lifecycle/static initialization: setup and teardown operate on a directory dedicated to this suite. Missing-directory deletion succeeds, creation makes parents, and each test has independent setup. The filesystem singleton is initialized lazily. No introduced directory collision, ordering/filter dependency, ownership cycle, or static initialization issue was found. The lookup test restores its saved configuration value.
  5. Configuration: no item is added. Existing mutable configuration validation and update publication match the test's expectations.
  6. Compatibility: no production function symbol, storage format, rolling-upgrade behavior, or shipped glibc ABI input changes.
  7. Thrift/protobuf: no definitions change; field-ID compatibility checks are not applicable.
  8. Parallel paths: both ConfigValidatorTest declarations now use TEST_F; no additional counterpart requiring this correction was found.
  9. Conditions/error handling: no conditional checks are added. Setup reports filesystem failures through assertions; the unchanged test checks successful and rejected configuration updates.
  10. Coverage: the existing unit test checks valid endpoints 1 and 32, invalid values 0/-1/33, preservation after rejected updates, and restoration. The file is already included in the BE test target. Additional feature or end-to-end coverage is not needed for this declaration correction.
  11. Test results: no result/golden files change; existing expectations agree with the validator. Builds and tests were not run, as required by this static-review contract.
  12. Observability: existing GoogleTest assertions report failures; no new production logs or metrics are needed.
  13. Transactions/persistence: no transaction, EditLog, failover, or persistent configuration behavior changes.
  14. Data writes/crashes: no product data-write or crash-atomicity path changes. Fixture filesystem work is limited to its test directory; setup failure precedes test-body mutation, and ordinary EXPECT failures do not bypass final restoration.
  15. FE-BE propagation: no transmitted variable or send path changes.
  16. Performance/memory: a few local directory operations per unit test introduce no material performance or memory-accounting concern; production hot paths are unaffected.
  17. Other checks: no headers/includes, PCH, template instantiations, unity-skip lists, gate tables, or dependencies change. No other substantiated regression was found.
  18. User focus: no additional focus was supplied; the entire changed-file scope was reviewed.

The main risk scan, full-review pass, separate fixture-lifecycle risk scan, and recovery verification converged in round 1 with NO_NEW_VALUABLE_FINDINGS. All suspicious points have concrete dispositions, and the final changed-file/unresolved-candidate sweep is complete. Current head/base and fresh GitHub reviews/comments were checked immediately before submission. There are no new inline findings or existing P0/P1 IDs to carry forward.

@eldenmoon eldenmoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17586	5730	5561	5561
q2	2110	346	278	278
q3	10176	1423	860	860
q4	4678	475	354	354
q5	7452	803	546	546
q6	186	184	152	152
q7	762	820	622	622
q8	9252	1358	1076	1076
q9	5698	4492	4452	4452
q10	6825	1295	1031	1031
q11	442	262	245	245
q12	623	410	296	296
q13	18045	3090	2394	2394
q14	276	276	241	241
q15	q16	743	743	679	679
q17	1206	746	583	583
q18	7162	6254	6190	6190
q19	1218	975	634	634
q20	385	341	247	247
q21	5445	2297	2436	2297
q22	369	327	276	276
Total cold run time: 100639 ms
Total hot run time: 29014 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	6164	6177	6157	6157
q2	701	556	569	556
q3	5270	5415	4927	4927
q4	2051	2145	1570	1570
q5	5255	5497	5980	5497
q6	266	204	159	159
q7	2384	2084	1898	1898
q8	3269	3032	2835	2835
q9	8134	8148	8159	8148
q10	3813	3747	3348	3348
q11	630	469	406	406
q12	708	749	548	548
q13	2885	3216	2486	2486
q14	326	331	296	296
q15	q16	692	714	690	690
q17	8555	7516	7371	7371
q18	13112	12307	13093	12307
q19	979	912	868	868
q20	2278	2209	2001	2001
q21	6087	4765	4811	4765
q22	494	446	419	419
Total cold run time: 74053 ms
Total hot run time: 67252 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 152109 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 f4d1a16de65dbbdc7dc22ec0692b1a586fd69372, data reload: false

query5	4312	596	462	462
query6	428	206	187	187
query7	4808	441	226	226
query8	314	179	169	169
query9	8764	3972	3979	3972
query10	450	319	259	259
query11	5924	3434	3196	3196
query12	141	89	84	84
query13	1267	435	326	326
query14	6532	4814	4484	4484
query14_1	4275	4274	4209	4209
query15	207	199	196	196
query16	944	461	426	426
query17	863	672	540	540
query18	2418	427	309	309
query19	198	160	138	138
query20	82	82	86	82
query21	207	137	112	112
query22	13019	13062	12801	12801
query23	13247	12446	12045	12045
query23_1	12258	12198	12338	12198
query24	7078	825	463	463
query24_1	485	477	478	477
query25	543	424	373	373
query26	1270	260	147	147
query27	2757	444	273	273
query28	4616	1933	1954	1933
query29	1592	607	456	456
query30	294	216	189	189
query31	888	770	656	656
query32	149	109	92	92
query33	516	306	254	254
query34	928	863	497	497
query35	757	787	645	645
query36	791	827	739	739
query37	127	104	93	93
query38	1800	1757	1703	1703
query39	737	699	709	699
query39_1	655	676	666	666
query40	219	119	101	101
query41	71	68	72	68
query42	86	83	85	83
query43	371	392	330	330
query44	1306	706	714	706
query45	180	176	164	164
query46	868	964	577	577
query47	3019	2922	2954	2922
query48	300	326	229	229
query49	603	398	295	295
query50	675	266	220	220
query51	10560	10713	10518	10518
query52	77	82	67	67
query53	188	204	150	150
query54	228	204	179	179
query55	75	73	61	61
query56	225	220	219	219
query57	1610	1581	1564	1564
query58	289	254	246	246
query59	2361	2380	2128	2128
query60	283	234	205	205
query61	149	139	145	139
query62	403	341	298	298
query63	198	162	165	162
query64	2765	964	788	788
query65	3419	3371	3347	3347
query66	1792	409	298	298
query67	20324	20227	20006	20006
query68	3013	996	629	629
query69	383	312	252	252
query70	888	842	823	823
query71	293	219	193	193
query72	2731	2600	2296	2296
query73	533	524	291	291
query74	4556	4458	4315	4315
query75	2354	2309	1932	1932
query76	2295	1037	601	601
query77	358	389	305	305
query78	9025	9087	8516	8516
query79	974	916	524	524
query80	562	432	336	336
query81	525	334	273	273
query82	565	139	115	115
query83	290	201	179	179
query84	304	123	100	100
query85	814	422	366	366
query86	327	237	230	230
query87	2002	1971	1834	1834
query88	3681	2772	2729	2729
query89	341	300	254	254
query90	1923	181	172	172
query91	160	151	122	122
query92	97	87	84	84
query93	1035	1000	572	572
query94	452	316	268	268
query95	605	345	311	311
query96	671	530	231	231
query97	2439	2412	2302	2302
query98	158	152	144	144
query99	787	755	653	653
Total cold run time: 234111 ms
Total hot run time: 152109 ms

@hello-stephen

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

query1	0.01	0.00	0.01
query2	0.10	0.05	0.04
query3	0.26	0.11	0.11
query4	1.60	0.12	0.11
query5	0.28	0.24	0.24
query6	1.18	0.69	0.68
query7	0.04	0.01	0.01
query8	0.05	0.04	0.04
query9	0.43	0.35	0.36
query10	0.59	0.59	0.56
query11	0.20	0.14	0.14
query12	0.18	0.14	0.14
query13	0.48	0.49	0.48
query14	0.97	0.96	0.96
query15	0.62	0.62	0.61
query16	0.35	0.35	0.35
query17	1.16	1.13	1.11
query18	0.23	0.20	0.20
query19	2.11	2.02	2.03
query20	0.01	0.01	0.02
query21	15.49	0.27	0.15
query22	4.48	0.05	0.06
query23	16.26	0.30	0.12
query24	2.70	0.72	0.46
query25	0.11	0.05	0.05
query26	1.83	0.25	0.15
query27	0.05	0.05	0.04
query28	2.27	0.61	0.42
query29	12.53	4.10	3.28
query30	0.28	0.14	0.13
query31	2.77	0.57	0.34
query32	3.23	0.62	0.51
query33	3.13	3.16	3.17
query34	15.52	4.02	3.37
query35	3.32	3.33	3.36
query36	0.55	0.49	0.46
query37	0.10	0.06	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.04
query40	0.17	0.14	0.14
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 95.9 s
Total hot run time: 24.52 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.89% (35464/46121)
Line Coverage 62.16% (401263/645568)
Region Coverage 58.57% (338601/578155)
Branch Coverage 59.49% (156027/262277)

@suxiaogang223
suxiaogang223 merged commit 1f3cd90 into apache:master Oct 13, 2026
37 checks passed
@suxiaogang223
suxiaogang223 deleted the codex/fix-config-validator-test-fixture branch October 13, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants