Skip to content

[test](be) Isolate writer tests from file cache state - #70243

Open
xylaaaaa wants to merge 3 commits into
apache:masterfrom
xylaaaaa:codex/be-writer-cache-isolation
Open

xylaaaaa wants to merge 3 commits into
apache:masterfrom
xylaaaaa:codex/be-writer-cache-isolation

Conversation

@xylaaaaa

@xylaaaaa xylaaaaa commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Background

The BE service registers a file cache factory in ExecEnv at startup. The BE unit-test runner reads the server configuration without performing that startup step. Both writer construction and tablet cleanup can reach the file cache.

What problem does this PR solve?

Issue Number: None
Related PR: #68797 (enabled file caching by default), #69605 (initial S3 fixture fix), #69670 (overlapping S3 client teardown)
PR Type: Test

Problem Summary: S3, Hive report-writer, HDFS and packed-file-manager unit tests can crash when run alone or after a fixture leaves an empty cache factory. A downloader or cloud-tablet test can mask the crash by leaving caching disabled. With caching enabled but no populated factory, dropping a tablet can also crash in rowset cleanup. Set the file-cache default to false in the test runner’s copy of be.conf. Writer fixtures that exercise caching install a populated cache, explicitly enable it, and restore both the factory and the flag afterward.

Details

  • Failure: Isolated writers dereference a missing cache factory during S3/HDFS writer construction or a packed-file cache write. With an empty factory, the same lookup takes a hash modulo zero. In a shuffled run, the S3 buffer-boundary test also removed the suite's mock callbacks, which made later tests send requests to S3.
  • Cause: The writer fixtures relied on process-wide state set by other tests. The boundary test used its own in-memory client but also cleared all registered callbacks and left a changed buffer size behind.
  • Tablet cleanup: The service default enables file caching, but the unit-test executable does not initialize a cache. Once the writer and downloader fixtures correctly restore the enable flag, TestDeltaWriterClusterKey.vec_sequence_col can call Rowset::clear_cache() with an empty factory while dropping the tablet. The test runner now writes its default to the copy of be.conf used by the test binary.
  • Stability evidence: The 76 focused tests pass in the default order and three shuffled runs (seeds 7301, 7302 and 7303). The HDFS write test also passes alone and immediately after a block-cache fixture that leaves an empty factory. The scope tests exercise a missing factory, an empty factory, reuse of a populated factory, and restoration with either initial value of the enable flag.

Testing

  • Reproduced three ASAN segmentation faults with the fixtures from 315c2e0033. S3FileWriterTest.multi_part_io_error and VHivePartitionWriterReportLifecycleTest.PeriodicReportDefersMetadataAndFinalReportTransfersUploadIdentity fail during writer construction. PackedFileManagerTest.ProcessUploadingFilesSetsFailedWhenMetaUpdateFails fails during the cache write. All three pass in separate processes with this change. The Azure Hive case and three additional packed-upload cases also pass in separate processes (7/7).
  • In BE UT build 1093099, HdfsFileSystemTest.Write aborted with ASAN FPE in FileCacheFactory::get_by_path. Reproduced the failure locally both alone and following BlockFileCacheTest.file_cache_profile_specialized_write_cache_counters. Both runs pass after giving the HDFS writer a scoped cache. The test still requests cache writes and verifies the writer installed its cache builder.
  • In BE UT build 1093619, HdfsFileSystemTest.Write passed. The run later aborted in TestDeltaWriterClusterKey.vec_sequence_col while dropping a tablet: TabletManager::drop_tablet → Rowset::clear_cache → FileCacheFactory::get_by_path (ASAN FPE). On macOS the old runner reproduced the crash at the same cache lookup when the block-cache test ran immediately before the DeltaWriter case. With the new runner the same pair passes, and the DeltaWriter case also passes alone under ASAN. All 85 tests in a combined run also passed, covering the DeltaWriter, MemTable, Segment, cache and writer fixtures, including the original HDFS failure. Checked that the generated config disables caching even when the source config explicitly enabled it and had no final newline.
  • Ran the 76 tests below on macOS under ASAN. All 76 passed in the default order and in each iteration of GTEST_SHUFFLE=1 GTEST_REPEAT=3 GTEST_RANDOM_SEED=7301, and both processes exited with status 0.
./run-be-ut.sh --run --filter='ScopedFileCacheTest.*:S3FileWriterTest.*:VHivePartitionWriterReportLifecycleTest.*:PackedFileManagerTest.*:FileCacheBlockDownloaderTest.*:CloudTabletSyncMetaTest.*:HdfsFileSystemTest.*:BlockFileCacheTest.file_cache_profile_specialized_write_cache_counters'

The macOS full suite stopped before the HDFS test on two failures that also reproduce in isolation: ColumnVariantV2Test.TypedComparisonBoundariesMatchEncodedWithoutMaterializing and LocalExchangerTest.TestShuffleExchangerWrongMap. Both passed on Linux in build 1093099. The local Linux x86_64 build was stopped before running tests. The full Linux BE UT, build 1094205, passed on 5d9cf757c6. GoogleTest reported 16,200 passed, 68 skipped and zero failures. The HDFS write and DeltaWriter tablet-cleanup cases both passed in the full run. The P0 regression and Cloud P0 regression also passed on the same commit. TeamCity reported one muted case in P0 and two in Cloud P0, including the STS role-configuration case in both jobs.

Clang-format 16, clang-tidy on the changed lines, and the BE build-hygiene checks passed.

Notes for Reviewers

The scope reuses an existing populated factory. Otherwise it creates a 16 MiB memory cache. The S3 and packed-file fixtures drain pending uploads before releasing the cache. The S3 fixture also releases its filesystem before AWS SDK shutdown.

Release note

None

Check List (For Author)

  • Test: BE unit tests under ASAN.
  • Behavior changed: No
  • Does this need documentation: No
  • Pre-submission status: Focused ASAN tests passed locally, and the full Linux BE UT passed on this PR head.

AI Disclosure

  • Tool: OpenAI Codex (GPT-6)
  • Generated: Implementation, unit tests, and PR description.
  • Human review: Pending author review.

### Background

The BE service registers a file cache factory in `ExecEnv` at startup. BE writer unit tests also construct S3 writers and packed-file managers, but run without starting the service.

### What problem does this PR solve?

Issue Number: None
Related PR: apache#68797 (enabled file caching by default), apache#69605 (initial S3 fixture fix), apache#69670 (overlapping S3 client teardown)
PR Type: Test

Problem Summary: S3, Hive report-writer and packed-file-manager unit tests can crash when run alone with file caching enabled. A downloader or cloud-tablet test can mask the crash by leaving caching disabled. Give the writer fixtures a populated cache for the duration of the test and restore the factory and its enable flag afterward.

### Details

- **Failure:** Isolated writers dereference a missing cache factory, either while constructing an S3 writer or while uploading a packed file. In a shuffled run, the S3 buffer-boundary test also removed the suite's mock callbacks, which made later tests send requests to S3.
- **Cause:** The writer fixtures relied on process-wide state set by other tests. The boundary test used its own in-memory client but also cleared all registered callbacks and left a changed buffer size behind.
- **Stability evidence:** The six affected suites pass together in three shuffled runs (seeds 7301, 7302 and 7303). The new scope tests exercise a missing factory, an empty factory, reuse of a populated factory, and restoration with either initial value of the enable flag.

### Testing

- Reproduced three ASAN segmentation faults with the fixtures from `315c2e0033`. `S3FileWriterTest.multi_part_io_error` and `VHivePartitionWriterReportLifecycleTest.PeriodicReportDefersMetadataAndFinalReportTransfersUploadIdentity` fail during writer construction. `PackedFileManagerTest.ProcessUploadingFilesSetsFailedWhenMetaUpdateFails` fails during the cache write. All three pass in separate processes with this change. The Azure Hive case and three additional packed-upload cases also pass in separate processes (7/7).
- Ran all six suites locally with the BE unit-test entry point under ASAN. The default run passed 68/68. Setting `GTEST_SHUFFLE=1 GTEST_REPEAT=3 GTEST_RANDOM_SEED=7301` passed 68/68 in each iteration and the process exited with status 0.

```sh
./run-be-ut.sh --run --filter='ScopedFileCacheTest.*:S3FileWriterTest.*:VHivePartitionWriterReportLifecycleTest.*:PackedFileManagerTest.*:FileCacheBlockDownloaderTest.*:CloudTabletSyncMetaTest.*'
```

Clang-format 16, clang-tidy on the changed lines, and the BE build-hygiene checks passed.

### Notes for Reviewers

The scope reuses an existing populated factory. Otherwise it creates a 16 MiB memory cache. The S3 and packed-file fixtures drain pending uploads before releasing the cache. The S3 fixture also releases its filesystem before AWS SDK shutdown.

### Release note

None

### Check List (For Author)

- Test: BE unit tests under ASAN.
- Behavior changed: No
- Does this need documentation: No
- Pre-submission status: Ready

### AI Disclosure

- Tool: OpenAI Codex (GPT-6)
- Generated: Implementation, unit tests, and PR description.
- Human review: Pending author review.
Copilot AI balanced review requested due to automatic review settings November 5, 2026 03:49
@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?

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@xylaaaaa

xylaaaaa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17602	5262	5076	5076
q2	2167	338	257	257
q3	10171	1375	813	813
q4	4676	459	344	344
q5	7434	831	529	529
q6	179	180	159	159
q7	763	790	599	599
q8	9254	1355	1022	1022
q9	5569	4225	4208	4208
q10	6817	1282	1064	1064
q11	424	247	229	229
q12	636	400	278	278
q13	18093	3695	3007	3007
q14	280	281	253	253
q15	q16	750	725	666	666
q17	1198	735	575	575
q18	6976	6181	6140	6140
q19	1264	964	574	574
q20	405	333	234	234
q21	5922	2164	2252	2164
q22	349	305	255	255
Total cold run time: 100929 ms
Total hot run time: 28446 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5583	5589	5616	5589
q2	689	582	559	559
q3	5191	5415	4865	4865
q4	1998	2164	1529	1529
q5	5233	5149	5762	5149
q6	260	200	155	155
q7	2412	2082	1937	1937
q8	3111	2875	2716	2716
q9	8080	8015	7939	7939
q10	3778	3651	3226	3226
q11	624	448	425	425
q12	693	677	512	512
q13	3565	3926	3356	3356
q14	314	310	287	287
q15	q16	687	745	645	645
q17	8349	7621	7184	7184
q18	12880	12159	12857	12159
q19	880	808	787	787
q20	2142	2136	1921	1921
q21	5682	4742	4861	4742
q22	524	482	429	429
Total cold run time: 72675 ms
Total hot run time: 66111 ms

@hello-stephen

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

query5	4315	580	432	432
query6	432	206	205	205
query7	4802	479	246	246
query8	326	165	154	154
query9	8784	3186	3211	3186
query10	488	320	268	268
query11	6002	3847	3555	3555
query12	140	92	86	86
query13	1248	462	330	330
query14	6125	3980	3671	3671
query14_1	3430	3468	3439	3439
query15	210	204	183	183
query16	977	454	427	427
query17	853	658	539	539
query18	2430	421	313	313
query19	211	163	141	141
query20	89	90	83	83
query21	220	129	105	105
query22	13011	12977	12956	12956
query23	13486	12794	12316	12316
query23_1	12499	12539	12586	12539
query24	7384	865	489	489
query24_1	490	478	477	477
query25	541	429	370	370
query26	1294	257	144	144
query27	2764	443	276	276
query28	4632	2024	2046	2024
query29	1586	601	452	452
query30	300	216	177	177
query31	1025	934	808	808
query32	147	97	88	88
query33	540	313	242	242
query34	909	873	530	530
query35	753	760	642	642
query36	812	782	728	728
query37	124	99	80	80
query38	1773	1739	1664	1664
query39	797	803	749	749
query39_1	748	731	741	731
query40	222	122	100	100
query41	74	69	68	68
query42	97	85	84	84
query43	350	362	312	312
query44	1370	714	737	714
query45	185	232	173	173
query46	832	963	561	561
query47	2771	2971	2756	2756
query48	291	329	230	230
query49	575	395	296	296
query50	661	270	210	210
query51	10410	10745	10436	10436
query52	85	80	70	70
query53	197	214	152	152
query54	234	232	194	194
query55	83	70	71	70
query56	238	207	213	207
query57	1689	1627	1572	1572
query58	282	270	267	267
query59	2097	2124	2023	2023
query60	316	246	232	232
query61	153	156	148	148
query62	378	338	312	312
query63	192	164	169	164
query64	2764	936	765	765
query65	3349	3297	3292	3292
query66	1793	427	297	297
query67	20311	20099	19938	19938
query68	3209	1002	612	612
query69	392	291	243	243
query70	865	789	772	772
query71	293	232	209	209
query72	2831	2592	2297	2297
query73	524	526	292	292
query74	4633	4535	4382	4382
query75	2363	2283	1948	1948
query76	2425	1019	624	624
query77	360	382	256	256
query78	9742	9804	9160	9160
query79	1020	871	547	547
query80	1087	424	376	376
query81	574	321	269	269
query82	576	132	108	108
query83	310	193	185	185
query84	307	134	101	101
query85	875	430	365	365
query86	354	239	234	234
query87	1994	1945	1805	1805
query88	3787	2787	2779	2779
query89	331	284	242	242
query90	1804	184	166	166
query91	159	153	124	124
query92	104	90	91	90
query93	1007	1027	582	582
query94	547	303	279	279
query95	593	336	372	336
query96	683	487	247	247
query97	2433	2443	2340	2340
query98	163	157	151	151
query99	765	755	645	645
Total cold run time: 235453 ms
Total hot run time: 151621 ms

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.09	0.05	0.04
query3	0.26	0.09	0.09
query4	1.61	0.11	0.10
query5	0.24	0.24	0.26
query6	1.17	0.69	0.67
query7	0.04	0.01	0.01
query8	0.05	0.04	0.04
query9	0.40	0.36	0.33
query10	0.61	0.61	0.59
query11	0.19	0.13	0.13
query12	0.18	0.14	0.14
query13	0.50	0.49	0.50
query14	1.02	1.03	1.02
query15	0.64	0.61	0.61
query16	0.35	0.36	0.36
query17	1.15	1.16	1.13
query18	0.19	0.19	0.19
query19	2.16	2.01	2.02
query20	0.02	0.01	0.01
query21	15.50	0.18	0.14
query22	4.94	0.05	0.06
query23	16.33	0.32	0.12
query24	3.08	0.78	0.54
query25	0.10	0.07	0.04
query26	1.12	0.23	0.16
query27	0.04	0.03	0.03
query28	3.67	0.79	0.38
query29	12.54	4.12	3.23
query30	0.28	0.13	0.09
query31	2.78	0.57	0.33
query32	3.22	0.61	0.52
query33	3.22	3.15	3.23
query34	15.30	4.01	3.41
query35	3.32	3.33	3.33
query36	0.57	0.48	0.44
query37	0.10	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.02
query40	0.18	0.15	0.14
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.04
Total cold run time: 97.44 s
Total hot run time: 24.51 s

### What problem does this PR solve?

Issue Number: None
Related PR: apache#70243

Problem Summary: HdfsFileSystemTest.Write requests cache writes but does not set up a usable cache factory. With caching enabled, it crashes when run alone or when an earlier block-cache fixture leaves an empty factory. Use the shared scoped cache for this test, verify the writer installs its cache builder, and restore the original HDFS write batch size when the test finishes.

### Release note

None

### Check List (For Author)

- Test: Reproduced the HDFS crash alone and following the block-cache fixture. Both pass locally under ASAN with the fix. All 76 focused tests passed in the default order and in three shuffled runs. The local Linux x86_64 full build was stopped before test execution.
- Behavior changed: No
- Does this need documentation: No
@xylaaaaa

xylaaaaa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17601	5130	5055	5055
q2	2191	339	275	275
q3	10178	1514	811	811
q4	4679	466	342	342
q5	7443	808	521	521
q6	185	182	151	151
q7	753	785	591	591
q8	9248	1307	1126	1126
q9	5447	4194	4192	4192
q10	6828	1310	1050	1050
q11	450	243	223	223
q12	641	405	280	280
q13	18111	3680	3036	3036
q14	275	270	253	253
q15	q16	723	739	653	653
q17	1198	741	572	572
q18	6932	6201	6136	6136
q19	1245	949	609	609
q20	406	334	238	238
q21	6204	2534	2415	2415
q22	377	338	282	282
Total cold run time: 101115 ms
Total hot run time: 28811 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5976	5994	6115	5994
q2	726	587	586	586
q3	5719	5851	5349	5349
q4	2056	2168	1548	1548
q5	5857	5941	5654	5654
q6	243	195	148	148
q7	2216	2050	1806	1806
q8	3110	2624	2631	2624
q9	7861	7530	7543	7530
q10	3628	3560	3087	3087
q11	568	410	391	391
q12	692	677	507	507
q13	3292	3600	3072	3072
q14	292	284	274	274
q15	q16	654	672	614	614
q17	7746	7089	6877	6877
q18	12921	12229	12728	12229
q19	910	775	776	775
q20	2133	2150	1921	1921
q21	5542	4590	4667	4590
q22	510	436	385	385
Total cold run time: 72652 ms
Total hot run time: 65961 ms

@hello-stephen

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

query5	4301	598	444	444
query6	427	204	188	188
query7	4811	433	235	235
query8	320	167	160	160
query9	8764	3162	3165	3162
query10	463	325	255	255
query11	5988	3859	3552	3552
query12	153	99	87	87
query13	1241	453	341	341
query14	6135	3906	3668	3668
query14_1	3447	3427	3375	3375
query15	208	202	182	182
query16	943	443	422	422
query17	860	668	542	542
query18	2428	419	313	313
query19	214	170	137	137
query20	87	84	86	84
query21	208	123	108	108
query22	12939	12979	12862	12862
query23	13401	13031	12556	12556
query23_1	12654	12522	12509	12509
query24	7382	834	479	479
query24_1	484	504	486	486
query25	531	432	360	360
query26	1255	266	145	145
query27	2778	441	277	277
query28	4672	2030	2026	2026
query29	1575	613	452	452
query30	300	228	198	198
query31	1014	930	822	822
query32	147	97	91	91
query33	542	301	245	245
query34	900	863	498	498
query35	742	753	650	650
query36	820	831	730	730
query37	127	101	84	84
query38	1770	1756	1637	1637
query39	787	806	739	739
query39_1	732	736	744	736
query40	220	115	98	98
query41	73	72	70	70
query42	92	86	82	82
query43	354	360	310	310
query44	1322	691	714	691
query45	185	183	168	168
query46	838	970	568	568
query47	2742	2834	2964	2834
query48	295	298	219	219
query49	583	384	287	287
query50	678	282	206	206
query51	10320	10517	10274	10274
query52	84	81	73	73
query53	184	210	149	149
query54	241	206	188	188
query55	77	71	65	65
query56	214	223	228	223
query57	1641	1602	1565	1565
query58	290	266	262	262
query59	2149	2188	1981	1981
query60	288	240	227	227
query61	150	147	151	147
query62	393	335	304	304
query63	183	158	154	154
query64	2733	987	742	742
query65	3324	3271	3227	3227
query66	1783	422	306	306
query67	22640	22707	22474	22474
query68	2930	999	631	631
query69	390	290	248	248
query70	845	776	752	752
query71	296	234	211	211
query72	2759	2604	2291	2291
query73	511	524	293	293
query74	4599	4494	4364	4364
query75	2336	2293	1915	1915
query76	2340	1010	577	577
query77	327	371	271	271
query78	9753	9712	9240	9240
query79	1000	857	528	528
query80	760	422	343	343
query81	551	311	265	265
query82	582	142	112	112
query83	288	196	185	185
query84	305	128	99	99
query85	958	420	370	370
query86	352	239	234	234
query87	1988	1944	1809	1809
query88	3755	2770	2751	2751
query89	334	280	244	244
query90	1718	169	154	154
query91	158	155	128	128
query92	98	90	91	90
query93	1004	1013	576	576
query94	503	297	287	287
query95	576	346	355	346
query96	682	485	245	245
query97	2488	2457	2320	2320
query98	164	151	146	146
query99	782	777	678	678
Total cold run time: 236485 ms
Total hot run time: 153833 ms

@hello-stephen

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

query1	0.01	0.01	0.01
query2	0.09	0.05	0.05
query3	0.26	0.09	0.09
query4	1.61	0.11	0.11
query5	0.26	0.25	0.24
query6	1.17	0.68	0.68
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.40	0.35	0.36
query10	0.60	0.57	0.61
query11	0.20	0.16	0.14
query12	0.19	0.14	0.14
query13	0.49	0.50	0.50
query14	1.02	1.01	1.02
query15	0.62	0.62	0.61
query16	0.36	0.35	0.36
query17	1.17	1.17	1.15
query18	0.21	0.18	0.20
query19	2.06	1.98	1.99
query20	0.02	0.01	0.02
query21	15.49	0.20	0.14
query22	4.90	0.06	0.05
query23	16.27	0.31	0.12
query24	3.16	0.58	0.36
query25	0.11	0.06	0.06
query26	1.38	0.21	0.16
query27	0.05	0.05	0.03
query28	3.45	0.81	0.38
query29	12.49	4.14	3.28
query30	0.28	0.13	0.10
query31	2.77	0.57	0.33
query32	3.23	0.60	0.51
query33	3.14	3.17	3.27
query34	15.38	3.98	3.37
query35	3.32	3.34	3.36
query36	0.56	0.44	0.43
query37	0.09	0.06	0.07
query38	0.05	0.04	0.03
query39	0.03	0.03	0.03
query40	0.16	0.15	0.14
query41	0.08	0.03	0.02
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 97.32 s
Total hot run time: 24.4 s

### What problem does this PR solve?

Issue Number: None

Related PR: apache#70243

Problem Summary: The BE test binary loads the server default for file
caching without initializing the server's cache factory. When a test leaves
an empty factory in ExecEnv, dropping a tablet in TestDeltaWriterClusterKey
reaches a modulo-by-zero in Rowset::clear_cache. Disable caching in the
test runner's copy of be.conf so ordinary tests start with a consistent
setting. Writer fixtures that exercise caching enable it with a populated
factory for the duration of each test.

### Release note

None

### Check List (For Author)

- Test: ASAN unit tests on macOS. The failing DeltaWriter test passed
  alone and all 85 related tests passed together. Validated the generated
  test config with an explicit cache setting and no final newline.
- Behavior changed: No
- Does this need documentation: No
@xylaaaaa

xylaaaaa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17602	5139	5024	5024
q2	2116	310	249	249
q3	10269	1361	801	801
q4	4684	456	334	334
q5	7436	787	512	512
q6	179	188	153	153
q7	728	778	594	594
q8	9250	1336	1035	1035
q9	5384	4147	4160	4147
q10	6809	1285	1018	1018
q11	423	237	225	225
q12	639	394	273	273
q13	18094	3563	3008	3008
q14	269	265	253	253
q15	q16	710	715	665	665
q17	1176	739	562	562
q18	6972	6170	6074	6074
q19	1138	964	584	584
q20	378	340	224	224
q21	5297	2470	2424	2424
q22	377	335	278	278
Total cold run time: 99930 ms
Total hot run time: 28437 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5974	5956	5897	5897
q2	698	565	549	549
q3	5555	5772	5283	5283
q4	2193	2144	1522	1522
q5	5751	5699	5794	5699
q6	243	189	152	152
q7	2244	2023	1652	1652
q8	2777	2430	2435	2430
q9	7514	7514	7475	7475
q10	3592	3561	3125	3125
q11	575	395	381	381
q12	647	661	496	496
q13	3219	3588	3014	3014
q14	276	291	269	269
q15	q16	665	676	629	629
q17	7700	6985	6847	6847
q18	12987	12146	12812	12146
q19	899	763	782	763
q20	2132	2166	1897	1897
q21	5514	4505	4619	4505
q22	482	482	402	402
Total cold run time: 71637 ms
Total hot run time: 65133 ms

@hello-stephen

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

query5	4318	564	432	432
query6	427	199	186	186
query7	4803	448	224	224
query8	316	190	144	144
query9	8753	3125	3128	3125
query10	478	308	240	240
query11	6013	3843	3535	3535
query12	155	92	87	87
query13	1247	452	345	345
query14	6161	3860	3558	3558
query14_1	3387	3406	3344	3344
query15	205	208	184	184
query16	934	436	341	341
query17	854	656	540	540
query18	2434	420	308	308
query19	207	166	143	143
query20	83	83	82	82
query21	208	123	105	105
query22	12989	12954	12690	12690
query23	13370	12898	12563	12563
query23_1	12458	12517	12706	12517
query24	7351	823	470	470
query24_1	490	485	486	485
query25	537	423	363	363
query26	1263	261	142	142
query27	2776	429	272	272
query28	4641	2013	2006	2006
query29	1564	596	442	442
query30	300	220	181	181
query31	1008	928	822	822
query32	142	91	86	86
query33	529	303	242	242
query34	952	853	509	509
query35	736	739	626	626
query36	818	802	772	772
query37	123	94	82	82
query38	1775	1711	1664	1664
query39	800	780	754	754
query39_1	737	736	747	736
query40	234	133	97	97
query41	72	70	69	69
query42	93	88	87	87
query43	345	356	311	311
query44	1302	714	700	700
query45	187	171	173	171
query46	829	950	570	570
query47	2948	2893	2746	2746
query48	343	309	227	227
query49	570	394	290	290
query50	695	267	222	222
query51	10689	10426	10704	10426
query52	73	80	68	68
query53	184	207	149	149
query54	238	187	190	187
query55	70	67	67	67
query56	210	213	197	197
query57	1638	1616	1536	1536
query58	286	256	265	256
query59	2206	2230	2053	2053
query60	278	235	219	219
query61	148	145	142	142
query62	390	335	284	284
query63	184	153	160	153
query64	2697	953	759	759
query65	3309	3255	3240	3240
query66	1768	410	294	294
query67	22765	22573	22514	22514
query68	3099	1010	620	620
query69	373	275	232	232
query70	815	772	768	768
query71	281	252	206	206
query72	2691	2572	2260	2260
query73	507	516	295	295
query74	4606	4496	4338	4338
query75	2327	2384	1905	1905
query76	2309	1020	597	597
query77	338	377	269	269
query78	9898	9642	9163	9163
query79	981	835	524	524
query80	1200	429	333	333
query81	572	315	260	260
query82	601	130	109	109
query83	295	193	181	181
query84	307	121	103	103
query85	864	422	364	364
query86	395	233	240	233
query87	1982	1943	1776	1776
query88	3787	2742	2768	2742
query89	332	279	247	247
query90	1917	170	158	158
query91	166	146	128	128
query92	101	88	87	87
query93	1025	996	586	586
query94	621	297	278	278
query95	568	374	298	298
query96	687	485	238	238
query97	2450	2438	2330	2330
query98	158	154	146	146
query99	773	768	673	673
Total cold run time: 237853 ms
Total hot run time: 153135 ms

@hello-stephen

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

query1	0.01	0.00	0.00
query2	0.09	0.04	0.05
query3	0.26	0.10	0.09
query4	1.61	0.10	0.09
query5	0.22	0.23	0.24
query6	1.17	0.68	0.67
query7	0.04	0.00	0.00
query8	0.06	0.04	0.04
query9	0.41	0.36	0.35
query10	0.56	0.57	0.57
query11	0.19	0.14	0.14
query12	0.18	0.15	0.15
query13	0.47	0.48	0.48
query14	1.01	1.02	1.00
query15	0.62	0.61	0.61
query16	0.34	0.34	0.34
query17	1.18	1.16	1.12
query18	0.20	0.19	0.19
query19	2.07	1.93	1.92
query20	0.02	0.01	0.01
query21	15.49	0.18	0.13
query22	4.95	0.06	0.05
query23	16.28	0.34	0.11
query24	2.80	0.80	0.67
query25	0.11	0.07	0.07
query26	1.67	0.23	0.16
query27	0.05	0.04	0.03
query28	3.62	0.76	0.33
query29	12.49	4.13	3.26
query30	0.28	0.12	0.09
query31	2.77	0.57	0.33
query32	3.22	0.60	0.50
query33	3.23	3.26	3.16
query34	15.30	4.00	3.39
query35	3.36	3.33	3.30
query36	0.56	0.47	0.44
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.04	0.03
query40	0.17	0.14	0.14
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.04
Total cold run time: 97.39 s
Total hot run time: 24.41 s

@xylaaaaa

xylaaaaa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

run cloud_p0

@xylaaaaa

xylaaaaa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

run p0

@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 77.76% (35959/46241)
Line Coverage 63.15% (404874/641139)
Region Coverage 59.75% (342818/573721)
Branch Coverage 60.88% (158770/260806)

@xylaaaaa

xylaaaaa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

run cloud_p0

@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 77.77% (35961/46241)
Line Coverage 63.15% (404909/641139)
Region Coverage 59.76% (342873/573721)
Branch Coverage 60.88% (158789/260806)

1 similar comment
@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 77.77% (35961/46241)
Line Coverage 63.15% (404909/641139)
Region Coverage 59.76% (342873/573721)
Branch Coverage 60.88% (158789/260806)

@liaoxin01 liaoxin01 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.

LGTM

@morningman

Copy link
Copy Markdown
Contributor

run cloud

@morningman morningman closed this Nov 6, 2026
@morningman morningman reopened this Nov 6, 2026
@morningman

Copy link
Copy Markdown
Contributor

run cloudut

@sollhui sollhui 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.

LGTM

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.

6 participants