Skip to content

Conversation

@eldenmoon
Copy link
Member

@eldenmoon eldenmoon commented Feb 8, 2025

The most important changes focus on adding support for schema dictionary caching, modifying existing methods to utilize the cache, and ensuring schema consistency.

/*
 * SchemaCloudDictionaryCache provides a local cache for SchemaCloudDictionary. *
 * Caching logic:
 *  - If the dictionary associated with a given key has not had any new columns added
 *    (determined by comparing the serialized data for consistency),
 *    the cached dictionary is directly used to update the dictionary list in the rowset meta
 *    (similar to the process_dictionary logic in write_schema_dict).
 *  - If new columns have been detected, the local cache is disregarded, and the updated
 *    dictionary should be fetched via the meta service.
 */

use SchemaCloudDictionaryCache in Backend to reduce the frequency of reading and converting SchemaCloudDictionary in MetaService

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

@Thearas
Copy link
Contributor

Thearas commented Feb 8, 2025

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?

@eldenmoon
Copy link
Member Author

run buildall

/*
 * SchemaCloudDictionaryCache provides a local cache for SchemaCloudDictionary.
 *
 * Caching logic:
 *  - If the dictionary associated with a given key has not had any new columns added
 *    (determined by comparing the serialized data for consistency),
 *    the cached dictionary is directly used to update the dictionary list in the rowset meta
 *    (similar to the process_dictionary logic in write_schema_dict).
 *  - If new columns have been detected, the local cache is disregarded, and the updated
 *    dictionary should be fetched via the meta service.
 */

use SchemaCloudDictionaryCache in Backend to reduce the frequency of reading and converting SchemaCloudDictionary in MetaService
@eldenmoon
Copy link
Member Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17818	5233	5056	5056
q2	2061	307	166	166
q3	10485	1340	718	718
q4	10238	1017	529	529
q5	7676	2429	2370	2370
q6	192	163	131	131
q7	906	752	604	604
q8	9297	1306	1129	1129
q9	5183	4821	4726	4726
q10	6853	2320	1891	1891
q11	485	273	259	259
q12	352	355	222	222
q13	17781	3709	3068	3068
q14	242	225	223	223
q15	516	485	456	456
q16	636	627	579	579
q17	575	883	342	342
q18	6911	6365	6355	6355
q19	1229	960	554	554
q20	308	330	193	193
q21	2834	2171	1941	1941
q22	371	323	303	303
Total cold run time: 102949 ms
Total hot run time: 31815 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5156	5128	5113	5113
q2	240	330	232	232
q3	2202	2661	2295	2295
q4	1399	1835	1364	1364
q5	4266	4186	4185	4185
q6	204	159	123	123
q7	1879	1831	1799	1799
q8	2655	2696	2633	2633
q9	7359	7147	7112	7112
q10	3064	3208	2731	2731
q11	578	501	481	481
q12	713	799	655	655
q13	3534	3939	3323	3323
q14	274	290	268	268
q15	514	469	467	467
q16	641	680	648	648
q17	1130	1585	1369	1369
q18	7573	7415	7194	7194
q19	772	785	866	785
q20	1936	2033	1855	1855
q21	5479	4953	4854	4854
q22	660	585	548	548
Total cold run time: 52228 ms
Total hot run time: 50034 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 42.59% (11162/26211)
Line Coverage: 32.61% (93890/287913)
Region Coverage: 31.77% (48149/151533)
Branch Coverage: 27.70% (24309/87760)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0cf64d01506a0415574d13c1d4c27cdb593b6672_0cf64d01506a0415574d13c1d4c27cdb593b6672/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 183512 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 0cf64d01506a0415574d13c1d4c27cdb593b6672, data reload: false

query1	973	377	388	377
query2	6548	1834	1830	1830
query3	6805	211	213	211
query4	26318	23893	23237	23237
query5	4305	643	462	462
query6	289	196	208	196
query7	4609	523	311	311
query8	298	241	232	232
query9	8611	2495	2508	2495
query10	485	311	249	249
query11	15548	15222	15078	15078
query12	160	106	109	106
query13	1647	504	390	390
query14	8923	6160	6136	6136
query15	214	221	189	189
query16	7099	643	474	474
query17	898	691	582	582
query18	1879	393	295	295
query19	204	183	149	149
query20	120	113	122	113
query21	207	133	103	103
query22	4190	4255	4105	4105
query23	33854	33042	32999	32999
query24	8079	2411	2395	2395
query25	566	453	378	378
query26	1241	276	164	164
query27	2654	472	334	334
query28	4421	2386	2359	2359
query29	761	579	447	447
query30	240	190	157	157
query31	934	859	800	800
query32	77	70	71	70
query33	570	380	292	292
query34	776	854	500	500
query35	807	808	755	755
query36	955	991	895	895
query37	123	104	77	77
query38	4209	4185	4266	4185
query39	1482	1402	1395	1395
query40	213	112	102	102
query41	60	81	54	54
query42	128	103	102	102
query43	498	501	465	465
query44	1276	787	769	769
query45	173	171	158	158
query46	853	1031	641	641
query47	1771	1791	1711	1711
query48	372	407	293	293
query49	778	509	420	420
query50	691	743	423	423
query51	4188	4166	4134	4134
query52	111	109	94	94
query53	232	268	181	181
query54	489	497	407	407
query55	87	83	79	79
query56	267	276	250	250
query57	1131	1132	1087	1087
query58	243	236	251	236
query59	2637	2934	2565	2565
query60	300	302	289	289
query61	160	118	117	117
query62	825	731	658	658
query63	231	192	191	191
query64	4420	1006	654	654
query65	3239	3162	3132	3132
query66	1134	420	322	322
query67	15989	15490	15294	15294
query68	2291	777	538	538
query69	418	311	272	272
query70	1168	1146	1105	1105
query71	320	290	274	274
query72	5830	3573	3746	3573
query73	631	726	342	342
query74	8906	9245	8964	8964
query75	3131	3193	2688	2688
query76	2238	1186	769	769
query77	331	440	301	301
query78	10087	10207	9317	9317
query79	988	879	581	581
query80	596	527	467	467
query81	472	273	241	241
query82	212	153	121	121
query83	176	171	158	158
query84	332	92	85	85
query85	705	366	331	331
query86	313	295	285	285
query87	4499	4445	4291	4291
query88	2825	2176	2176	2176
query89	397	310	300	300
query90	1875	197	195	195
query91	136	144	109	109
query92	64	59	63	59
query93	1067	1023	577	577
query94	470	396	304	304
query95	359	273	275	273
query96	476	558	265	265
query97	2759	2897	2751	2751
query98	231	209	198	198
query99	1261	1418	1252	1252
Total cold run time: 260139 ms
Total hot run time: 183512 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.15 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 0cf64d01506a0415574d13c1d4c27cdb593b6672, data reload: false

query1	0.03	0.04	0.04
query2	0.06	0.04	0.03
query3	0.24	0.07	0.06
query4	1.61	0.10	0.10
query5	0.40	0.41	0.41
query6	1.17	0.66	0.67
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.58	0.51	0.52
query10	0.58	0.58	0.58
query11	0.15	0.10	0.10
query12	0.14	0.10	0.11
query13	0.62	0.60	0.61
query14	2.82	2.70	2.69
query15	0.91	0.86	0.84
query16	0.36	0.37	0.38
query17	1.05	1.04	1.02
query18	0.22	0.20	0.20
query19	1.90	1.78	1.94
query20	0.01	0.01	0.01
query21	15.35	0.91	0.56
query22	0.76	1.38	0.75
query23	14.71	1.40	0.66
query24	6.93	1.90	1.16
query25	0.47	0.25	0.18
query26	0.54	0.16	0.14
query27	0.05	0.05	0.04
query28	10.38	0.87	0.43
query29	12.54	3.96	3.30
query30	0.24	0.08	0.08
query31	2.81	0.59	0.38
query32	3.24	0.54	0.46
query33	2.96	3.04	3.05
query34	15.70	5.11	4.53
query35	4.54	4.50	4.54
query36	0.66	0.50	0.48
query37	0.10	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.17	0.14	0.12
query41	0.09	0.03	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.3 s
Total hot run time: 31.15 s

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 82.25% (1061/1290)
Line Coverage: 65.87% (17586/26698)
Region Coverage: 65.30% (8668/13275)
Branch Coverage: 55.16% (4671/8468)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0cf64d01506a0415574d13c1d4c27cdb593b6672_0cf64d01506a0415574d13c1d4c27cdb593b6672_cloud/report/index.html

@eldenmoon
Copy link
Member Author

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 82.12% (1061/1292)
Line Coverage: 65.64% (17589/26796)
Region Coverage: 65.17% (8673/13308)
Branch Coverage: 55.10% (4677/8488)
Coverage Report: http://coverage.selectdb-in.cc/coverage/1015a80edb379d2c949d71071afb8228be6780b6_1015a80edb379d2c949d71071afb8228be6780b6_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17700	5311	5145	5145
q2	2051	293	166	166
q3	10511	1323	738	738
q4	10229	1009	560	560
q5	7560	2486	2333	2333
q6	196	166	132	132
q7	932	765	605	605
q8	9315	1370	1369	1369
q9	4864	4630	4583	4583
q10	6838	2327	1867	1867
q11	480	287	254	254
q12	349	359	217	217
q13	17767	3696	3152	3152
q14	236	239	219	219
q15	520	474	447	447
q16	620	628	579	579
q17	588	868	326	326
q18	6763	6307	6257	6257
q19	1606	980	566	566
q20	323	322	181	181
q21	2792	2150	1928	1928
q22	369	317	299	299
Total cold run time: 102609 ms
Total hot run time: 31923 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5205	5125	5127	5125
q2	237	345	226	226
q3	2180	2663	2302	2302
q4	1425	1819	1355	1355
q5	4243	4138	4154	4138
q6	202	160	121	121
q7	1869	1795	1721	1721
q8	2658	2675	2562	2562
q9	7305	7149	7150	7149
q10	2963	3207	2800	2800
q11	582	511	501	501
q12	668	767	628	628
q13	3470	3833	3258	3258
q14	277	291	282	282
q15	508	469	461	461
q16	631	676	644	644
q17	1156	1623	1314	1314
q18	7528	7259	7274	7259
q19	778	995	1075	995
q20	1948	2017	1885	1885
q21	5484	4938	4795	4795
q22	618	591	534	534
Total cold run time: 51935 ms
Total hot run time: 50055 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183835 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 1015a80edb379d2c949d71071afb8228be6780b6, data reload: false

query1	978	377	390	377
query2	6524	1891	1873	1873
query3	6791	211	209	209
query4	26304	23844	23444	23444
query5	4418	665	483	483
query6	299	192	184	184
query7	4605	497	297	297
query8	301	239	228	228
query9	8609	2496	2491	2491
query10	469	313	262	262
query11	15593	15046	14970	14970
query12	158	109	108	108
query13	1656	525	404	404
query14	9604	6561	6649	6561
query15	217	193	187	187
query16	7677	637	452	452
query17	1185	718	564	564
query18	1994	401	307	307
query19	199	201	162	162
query20	118	113	113	113
query21	210	118	102	102
query22	4266	4330	4499	4330
query23	34366	33563	32920	32920
query24	7741	2314	2369	2314
query25	519	423	378	378
query26	1220	270	154	154
query27	2106	488	332	332
query28	3867	2389	2359	2359
query29	745	555	407	407
query30	228	185	153	153
query31	915	844	797	797
query32	75	64	59	59
query33	556	344	298	298
query34	770	873	524	524
query35	799	823	739	739
query36	943	974	892	892
query37	117	100	74	74
query38	4095	4033	4142	4033
query39	1420	1403	1395	1395
query40	211	116	108	108
query41	53	49	49	49
query42	119	105	98	98
query43	502	500	478	478
query44	1269	787	777	777
query45	173	165	158	158
query46	863	1028	663	663
query47	1742	1797	1722	1722
query48	390	411	318	318
query49	775	539	449	449
query50	687	734	412	412
query51	4155	4168	4124	4124
query52	110	105	91	91
query53	225	255	186	186
query54	469	469	408	408
query55	83	75	79	75
query56	254	275	241	241
query57	1129	1133	1073	1073
query58	251	225	235	225
query59	2543	2765	2567	2567
query60	290	303	260	260
query61	114	120	124	120
query62	773	724	666	666
query63	237	186	193	186
query64	4414	1013	710	710
query65	3199	3143	3153	3143
query66	1053	416	288	288
query67	15737	15240	15269	15240
query68	8011	785	525	525
query69	468	292	265	265
query70	1163	1149	1051	1051
query71	408	290	261	261
query72	5705	3606	3662	3606
query73	711	738	354	354
query74	9174	9195	8958	8958
query75	3118	3177	2694	2694
query76	3258	1171	724	724
query77	467	366	278	278
query78	10004	10047	9243	9243
query79	1945	810	601	601
query80	657	531	500	500
query81	513	274	241	241
query82	223	129	97	97
query83	173	175	153	153
query84	241	88	74	74
query85	756	351	303	303
query86	384	298	272	272
query87	4394	4459	4377	4377
query88	2917	2240	2227	2227
query89	398	320	277	277
query90	1826	196	197	196
query91	138	140	175	140
query92	64	59	60	59
query93	1184	1070	592	592
query94	619	411	300	300
query95	360	277	252	252
query96	521	523	279	279
query97	2762	2862	2723	2723
query98	227	201	201	201
query99	1310	1410	1241	1241
Total cold run time: 268576 ms
Total hot run time: 183835 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.11 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 1015a80edb379d2c949d71071afb8228be6780b6, data reload: false

query1	0.04	0.03	0.04
query2	0.07	0.03	0.03
query3	0.24	0.06	0.07
query4	1.62	0.10	0.11
query5	0.41	0.41	0.41
query6	1.14	0.67	0.66
query7	0.03	0.02	0.01
query8	0.04	0.03	0.04
query9	0.59	0.51	0.53
query10	0.56	0.59	0.57
query11	0.15	0.11	0.10
query12	0.15	0.11	0.10
query13	0.61	0.60	0.61
query14	2.69	2.72	2.72
query15	0.92	0.86	0.84
query16	0.37	0.36	0.37
query17	0.99	1.02	1.02
query18	0.22	0.19	0.19
query19	1.90	1.80	1.99
query20	0.01	0.01	0.01
query21	15.35	0.88	0.54
query22	0.75	1.21	0.76
query23	14.77	1.40	0.66
query24	11.71	1.07	0.25
query25	0.32	0.17	0.10
query26	0.99	0.18	0.16
query27	0.05	0.04	0.04
query28	6.16	0.81	0.43
query29	12.51	3.91	3.23
query30	0.24	0.08	0.06
query31	2.83	0.59	0.39
query32	3.23	0.55	0.47
query33	2.93	3.00	3.08
query34	15.80	5.17	4.53
query35	4.57	4.53	4.56
query36	0.69	0.50	0.50
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.02	0.02	0.02
query40	0.18	0.14	0.13
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.14 s
Total hot run time: 30.11 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 43.83% (11640/26560)
Line Coverage: 33.74% (97592/289211)
Region Coverage: 32.84% (49951/152118)
Branch Coverage: 28.55% (25105/87930)
Coverage Report: http://coverage.selectdb-in.cc/coverage/1015a80edb379d2c949d71071afb8228be6780b6_1015a80edb379d2c949d71071afb8228be6780b6/report/index.html

@eldenmoon
Copy link
Member Author

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 82.12% (1061/1292)
Line Coverage: 65.65% (17592/26795)
Region Coverage: 65.16% (8671/13308)
Branch Coverage: 55.11% (4678/8488)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b346813dffc6372b83cf6e2b5109b98ad5b3ac07_b346813dffc6372b83cf6e2b5109b98ad5b3ac07_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17642	5343	5169	5169
q2	2065	310	165	165
q3	10492	1248	750	750
q4	10234	1024	535	535
q5	7618	2400	2394	2394
q6	199	168	132	132
q7	917	768	605	605
q8	9319	1333	1105	1105
q9	5028	4801	4707	4707
q10	6810	2316	1910	1910
q11	480	272	254	254
q12	352	356	235	235
q13	17765	3775	3118	3118
q14	227	239	212	212
q15	504	462	458	458
q16	642	633	578	578
q17	597	876	348	348
q18	6675	6208	6326	6208
q19	1823	948	565	565
q20	300	329	179	179
q21	2912	2266	2024	2024
q22	378	335	298	298
Total cold run time: 102979 ms
Total hot run time: 31949 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5229	5144	5150	5144
q2	236	330	232	232
q3	2158	2697	2311	2311
q4	1475	1830	1366	1366
q5	4267	4159	4169	4159
q6	213	165	124	124
q7	2044	1847	1751	1751
q8	2612	2663	2548	2548
q9	7233	7114	7147	7114
q10	3030	3223	2806	2806
q11	586	527	490	490
q12	739	765	641	641
q13	3353	3970	3284	3284
q14	282	297	267	267
q15	511	476	452	452
q16	676	678	642	642
q17	1171	1639	1322	1322
q18	7474	7370	7391	7370
q19	808	834	986	834
q20	2039	2013	1876	1876
q21	5556	4971	4897	4897
q22	615	567	551	551
Total cold run time: 52307 ms
Total hot run time: 50181 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191544 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 b346813dffc6372b83cf6e2b5109b98ad5b3ac07, data reload: false

query1	1326	949	932	932
query2	6178	1910	1863	1863
query3	11007	4536	4592	4536
query4	55138	24875	23731	23731
query5	5325	518	522	518
query6	435	188	198	188
query7	5275	497	302	302
query8	365	267	236	236
query9	7327	2616	2615	2615
query10	426	322	250	250
query11	15345	15163	15008	15008
query12	165	109	107	107
query13	1301	532	415	415
query14	10642	6492	6517	6492
query15	204	203	194	194
query16	7081	655	498	498
query17	1033	744	567	567
query18	1556	402	306	306
query19	192	200	166	166
query20	130	134	120	120
query21	202	122	109	109
query22	4403	4546	4318	4318
query23	33938	33309	33336	33309
query24	6031	2413	2466	2413
query25	460	476	401	401
query26	664	280	157	157
query27	1808	503	346	346
query28	2836	2537	2456	2456
query29	564	559	425	425
query30	223	195	157	157
query31	915	870	798	798
query32	78	60	64	60
query33	443	403	296	296
query34	758	874	526	526
query35	828	835	773	773
query36	921	1023	927	927
query37	117	105	76	76
query38	4143	4294	4256	4256
query39	1482	1432	1470	1432
query40	217	128	110	110
query41	54	54	53	53
query42	126	116	110	110
query43	508	523	494	494
query44	1318	836	827	827
query45	187	189	168	168
query46	890	1083	647	647
query47	1829	1852	1797	1797
query48	394	435	327	327
query49	696	556	442	442
query50	723	756	427	427
query51	4311	4258	4311	4258
query52	107	105	97	97
query53	230	255	196	196
query54	513	505	458	458
query55	81	83	85	83
query56	267	272	262	262
query57	1160	1205	1109	1109
query58	246	231	252	231
query59	2805	2885	2641	2641
query60	285	326	274	274
query61	127	120	121	120
query62	744	855	690	690
query63	224	193	191	191
query64	1470	1041	674	674
query65	3307	3184	3362	3184
query66	717	387	288	288
query67	15511	15331	15274	15274
query68	4153	893	513	513
query69	512	303	286	286
query70	1170	1118	1044	1044
query71	444	294	286	286
query72	6078	3796	4056	3796
query73	746	742	351	351
query74	9114	8964	8895	8895
query75	3276	3177	2685	2685
query76	2730	1172	750	750
query77	558	365	293	293
query78	10205	10368	9249	9249
query79	2256	834	586	586
query80	846	520	453	453
query81	547	277	243	243
query82	426	132	93	93
query83	192	170	155	155
query84	286	98	73	73
query85	878	366	316	316
query86	425	302	279	279
query87	4439	4473	4548	4473
query88	3092	2225	2203	2203
query89	400	325	283	283
query90	1814	195	194	194
query91	138	146	111	111
query92	80	59	58	58
query93	2928	1030	571	571
query94	681	417	306	306
query95	351	266	257	257
query96	489	576	265	265
query97	3256	3394	3269	3269
query98	230	204	205	204
query99	1326	1416	1293	1293
Total cold run time: 294378 ms
Total hot run time: 191544 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.11	0.04	0.04
query3	0.29	0.06	0.06
query4	1.59	0.08	0.08
query5	0.55	0.56	0.56
query6	1.18	0.72	0.73
query7	0.02	0.02	0.02
query8	0.07	0.05	0.04
query9	0.61	0.53	0.51
query10	0.60	0.60	0.57
query11	0.25	0.13	0.12
query12	0.24	0.13	0.12
query13	0.65	0.61	0.62
query14	2.68	2.80	2.72
query15	0.98	0.87	0.86
query16	0.36	0.37	0.37
query17	1.02	1.00	1.05
query18	0.17	0.18	0.17
query19	1.92	1.88	1.90
query20	0.01	0.02	0.01
query21	15.36	0.98	0.67
query22	0.93	1.00	0.83
query23	14.67	1.56	0.74
query24	5.61	0.58	0.27
query25	0.17	0.09	0.10
query26	0.56	0.22	0.19
query27	0.08	0.09	0.09
query28	11.02	1.13	0.54
query29	12.53	4.13	3.41
query30	0.28	0.08	0.07
query31	2.82	0.64	0.42
query32	3.23	0.61	0.50
query33	3.02	3.03	3.10
query34	16.72	5.13	4.38
query35	4.54	4.47	4.45
query36	0.63	0.50	0.50
query37	0.22	0.19	0.17
query38	0.18	0.15	0.15
query39	0.05	0.04	0.04
query40	0.19	0.16	0.17
query41	0.11	0.06	0.05
query42	0.07	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 106.38 s
Total hot run time: 31.33 s

@eldenmoon
Copy link
Member Author

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 82.12% (1061/1292)
Line Coverage: 65.66% (17595/26799)
Region Coverage: 65.16% (8673/13310)
Branch Coverage: 55.09% (4677/8490)
Coverage Report: http://coverage.selectdb-in.cc/coverage/7d7d9badddf58fe74d826924acb9dacaa98b5373_7d7d9badddf58fe74d826924acb9dacaa98b5373_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17601	5550	5256	5256
q2	2053	318	170	170
q3	10676	1616	714	714
q4	10260	1066	524	524
q5	7845	2562	2525	2525
q6	215	182	144	144
q7	1002	768	612	612
q8	9324	1531	1229	1229
q9	5171	4835	4766	4766
q10	6868	2352	1887	1887
q11	503	273	255	255
q12	363	390	225	225
q13	17784	3818	3177	3177
q14	234	233	203	203
q15	518	457	470	457
q16	653	632	590	590
q17	612	948	352	352
q18	7042	6247	6233	6233
q19	2134	1110	585	585
q20	324	338	194	194
q21	2882	2275	1985	1985
q22	363	330	294	294
Total cold run time: 104427 ms
Total hot run time: 32377 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5537	5416	5409	5409
q2	244	351	240	240
q3	2224	2736	2275	2275
q4	1500	1905	1364	1364
q5	4299	4184	4222	4184
q6	257	183	140	140
q7	2050	1929	1766	1766
q8	2899	2824	2791	2791
q9	7191	7194	7222	7194
q10	3093	3243	2800	2800
q11	614	505	488	488
q12	667	780	644	644
q13	3645	4037	3236	3236
q14	278	296	289	289
q15	534	492	457	457
q16	633	690	654	654
q17	1222	1782	1380	1380
q18	7660	7493	7249	7249
q19	870	854	1019	854
q20	2021	2051	1877	1877
q21	5588	5011	4880	4880
q22	657	598	544	544
Total cold run time: 53683 ms
Total hot run time: 50715 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183916 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 7d7d9badddf58fe74d826924acb9dacaa98b5373, data reload: false

query1	988	402	384	384
query2	6555	1893	1908	1893
query3	6805	211	211	211
query4	26449	23654	23310	23310
query5	4340	669	501	501
query6	300	195	205	195
query7	4620	508	293	293
query8	301	260	243	243
query9	8612	2599	2614	2599
query10	481	331	259	259
query11	15334	15127	14964	14964
query12	161	107	106	106
query13	1672	534	403	403
query14	9949	6561	6419	6419
query15	207	190	174	174
query16	7711	645	455	455
query17	1174	712	526	526
query18	1980	416	294	294
query19	188	179	151	151
query20	125	120	113	113
query21	205	119	102	102
query22	4273	4181	4145	4145
query23	33903	32980	32834	32834
query24	7695	2355	2386	2355
query25	513	454	389	389
query26	1239	269	151	151
query27	2395	479	325	325
query28	4199	2417	2397	2397
query29	726	552	417	417
query30	234	186	157	157
query31	959	867	774	774
query32	74	66	66	66
query33	557	361	302	302
query34	785	834	503	503
query35	805	826	737	737
query36	965	964	909	909
query37	120	98	84	84
query38	4090	4254	4003	4003
query39	1493	1431	1363	1363
query40	209	119	106	106
query41	55	55	52	52
query42	123	107	105	105
query43	505	508	479	479
query44	1297	809	782	782
query45	176	169	164	164
query46	852	1044	634	634
query47	1739	1792	1694	1694
query48	402	406	301	301
query49	773	523	435	435
query50	673	742	410	410
query51	4140	4226	4168	4168
query52	103	102	99	99
query53	226	259	183	183
query54	491	497	410	410
query55	82	77	81	77
query56	299	288	275	275
query57	1154	1159	1068	1068
query58	248	239	240	239
query59	2717	2871	2645	2645
query60	292	270	256	256
query61	118	117	120	117
query62	822	778	668	668
query63	237	197	193	193
query64	4398	1142	653	653
query65	3199	3126	3120	3120
query66	1057	406	319	319
query67	15731	15532	15143	15143
query68	8184	891	497	497
query69	462	292	259	259
query70	1197	1167	1147	1147
query71	448	294	259	259
query72	5447	3684	3761	3684
query73	772	743	347	347
query74	9018	9183	8653	8653
query75	3779	3202	2712	2712
query76	3714	1163	742	742
query77	837	368	286	286
query78	10107	10076	9364	9364
query79	2445	823	608	608
query80	670	529	455	455
query81	490	282	252	252
query82	684	129	95	95
query83	174	170	165	165
query84	244	88	74	74
query85	772	353	297	297
query86	357	301	307	301
query87	4385	4522	4368	4368
query88	3670	2286	2232	2232
query89	398	337	286	286
query90	1955	193	189	189
query91	141	138	109	109
query92	79	60	56	56
query93	1689	1058	576	576
query94	662	399	306	306
query95	354	257	260	257
query96	488	561	271	271
query97	3375	3412	3264	3264
query98	232	203	203	203
query99	1481	1429	1301	1301
Total cold run time: 274010 ms
Total hot run time: 183916 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.29 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 7d7d9badddf58fe74d826924acb9dacaa98b5373, data reload: false

query1	0.03	0.03	0.03
query2	0.07	0.03	0.04
query3	0.24	0.06	0.06
query4	1.62	0.10	0.10
query5	0.56	0.53	0.54
query6	1.18	0.71	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.04
query9	0.59	0.51	0.54
query10	0.57	0.57	0.55
query11	0.15	0.11	0.11
query12	0.15	0.12	0.11
query13	0.62	0.60	0.60
query14	2.78	2.68	2.68
query15	0.93	0.85	0.86
query16	0.39	0.37	0.38
query17	1.01	1.03	1.03
query18	0.21	0.19	0.20
query19	1.90	1.88	1.92
query20	0.02	0.01	0.01
query21	15.35	0.88	0.58
query22	0.76	1.27	0.72
query23	14.78	1.38	0.60
query24	6.63	1.26	1.94
query25	0.55	0.29	0.10
query26	0.59	0.16	0.14
query27	0.05	0.05	0.05
query28	9.95	0.87	0.45
query29	12.58	4.05	3.34
query30	0.25	0.09	0.06
query31	2.84	0.60	0.38
query32	3.22	0.55	0.47
query33	3.01	3.04	2.99
query34	15.57	5.09	4.53
query35	4.50	4.43	4.52
query36	0.66	0.49	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.03	0.02	0.03
query40	0.16	0.13	0.12
query41	0.08	0.02	0.02
query42	0.04	0.03	0.03
query43	0.03	0.03	0.03
Total cold run time: 104.85 s
Total hot run time: 31.29 s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 27, 2025
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@csun5285 csun5285 left a comment

Choose a reason for hiding this comment

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

LGTM

@eldenmoon eldenmoon added the p0_b label Feb 28, 2025
@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 10.45% (44/421) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 44.98% (12000/26681)
Line Coverage 34.48% (100849/292466)
Region Coverage 33.66% (51647/153456)
Branch Coverage 29.42% (26129/88816)

@eldenmoon eldenmoon merged commit e44f45a into apache:master Feb 28, 2025
26 of 28 checks passed
@eldenmoon eldenmoon deleted the scd-cache branch February 28, 2025 05:06
github-actions bot pushed a commit that referenced this pull request Feb 28, 2025
…7629)

The most important changes focus on adding support for schema dictionary
caching, modifying existing methods to utilize the cache, and ensuring
schema consistency.
```
/*
 * SchemaCloudDictionaryCache provides a local cache for SchemaCloudDictionary. *
 * Caching logic:
 *  - If the dictionary associated with a given key has not had any new columns added
 *    (determined by comparing the serialized data for consistency),
 *    the cached dictionary is directly used to update the dictionary list in the rowset meta
 *    (similar to the process_dictionary logic in write_schema_dict).
 *  - If new columns have been detected, the local cache is disregarded, and the updated
 *    dictionary should be fetched via the meta service.
 */
```
use SchemaCloudDictionaryCache in Backend to reduce the frequency of
reading and converting SchemaCloudDictionary in MetaService
mymeiyi pushed a commit to mymeiyi/doris that referenced this pull request Mar 4, 2025
…ache#47629)

The most important changes focus on adding support for schema dictionary
caching, modifying existing methods to utilize the cache, and ensuring
schema consistency.
```
/*
 * SchemaCloudDictionaryCache provides a local cache for SchemaCloudDictionary. *
 * Caching logic:
 *  - If the dictionary associated with a given key has not had any new columns added
 *    (determined by comparing the serialized data for consistency),
 *    the cached dictionary is directly used to update the dictionary list in the rowset meta
 *    (similar to the process_dictionary logic in write_schema_dict).
 *  - If new columns have been detected, the local cache is disregarded, and the updated
 *    dictionary should be fetched via the meta service.
 */
```
use SchemaCloudDictionaryCache in Backend to reduce the frequency of
reading and converting SchemaCloudDictionary in MetaService
dataroaring pushed a commit that referenced this pull request Mar 24, 2025
… BE side #47629 (#48463)

Cherry-picked from #47629

Co-authored-by: lihangyu <lihangyu@selectdb.com>
@gavinchou gavinchou mentioned this pull request Apr 23, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
…ache#47629)

The most important changes focus on adding support for schema dictionary
caching, modifying existing methods to utilize the cache, and ensuring
schema consistency.
```
/*
 * SchemaCloudDictionaryCache provides a local cache for SchemaCloudDictionary. *
 * Caching logic:
 *  - If the dictionary associated with a given key has not had any new columns added
 *    (determined by comparing the serialized data for consistency),
 *    the cached dictionary is directly used to update the dictionary list in the rowset meta
 *    (similar to the process_dictionary logic in write_schema_dict).
 *  - If new columns have been detected, the local cache is disregarded, and the updated
 *    dictionary should be fetched via the meta service.
 */
```
use SchemaCloudDictionaryCache in Backend to reduce the frequency of
reading and converting SchemaCloudDictionary in MetaService
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.0.5-merged meta-change p0_b reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants