Skip to content

Conversation

@eldenmoon
Copy link
Member

…ma and write missing blocks

  1. update_rowset_schema should not update _context.tablet_schema, since it's used as src schema for schema change, if it's changed may lead to wrong schema with block
  2. buffering block during schema change should merge first and then flush, otherwise may lost current block

Proposed changes

Issue Number: close #xxx

@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@eldenmoon
Copy link
Member Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8989/24661)
Line Coverage: 28.02% (73689/262948)
Region Coverage: 27.49% (38272/139211)
Branch Coverage: 24.20% (19518/80658)
Coverage Report: http://coverage.selectdb-in.cc/coverage/276a6b4d632fbab1a9a49a531adcf93c0cee97ad_276a6b4d632fbab1a9a49a531adcf93c0cee97ad/report/index.html

@eldenmoon
Copy link
Member Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8988/24661)
Line Coverage: 28.02% (73672/262951)
Region Coverage: 27.49% (38263/139213)
Branch Coverage: 24.18% (19504/80660)
Coverage Report: http://coverage.selectdb-in.cc/coverage/9efde1162dc4a2647f6c8afdfdfdcdfe42be3ae6_9efde1162dc4a2647f6c8afdfdfdcdfe42be3ae6/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18345	4489	4400	4400
q2	2027	186	194	186
q3	10465	1115	1001	1001
q4	10197	763	748	748
q5	7502	2649	2561	2561
q6	219	136	133	133
q7	963	605	586	586
q8	9214	2047	2082	2047
q9	9002	6485	6461	6461
q10	8877	3759	3727	3727
q11	444	239	230	230
q12	400	226	224	224
q13	17775	2939	2970	2939
q14	259	207	215	207
q15	505	464	488	464
q16	520	377	378	377
q17	959	601	734	601
q18	8123	7501	7365	7365
q19	5380	1525	1573	1525
q20	658	309	327	309
q21	4957	3117	3820	3117
q22	380	326	334	326
Total cold run time: 117171 ms
Total hot run time: 39534 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4399	4247	4274	4247
q2	379	267	271	267
q3	2975	2734	2731	2731
q4	1877	1622	1629	1622
q5	5249	5241	5244	5241
q6	222	124	127	124
q7	2073	1764	1744	1744
q8	3158	3316	3310	3310
q9	8305	8307	8322	8307
q10	3886	3695	3689	3689
q11	598	473	481	473
q12	754	584	603	584
q13	17411	2952	2995	2952
q14	278	263	258	258
q15	517	471	467	467
q16	474	413	408	408
q17	1774	1458	1469	1458
q18	7491	7556	7425	7425
q19	1712	1613	1583	1583
q20	1978	1766	1785	1766
q21	4860	4608	4751	4608
q22	585	533	553	533
Total cold run time: 70955 ms
Total hot run time: 53797 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 169487 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 9efde1162dc4a2647f6c8afdfdfdcdfe42be3ae6, data reload: false

query1	948	380	365	365
query2	6453	2375	2290	2290
query3	6658	212	209	209
query4	21930	17680	17320	17320
query5	4095	482	454	454
query6	245	161	175	161
query7	4585	293	286	286
query8	309	280	269	269
query9	8809	2382	2396	2382
query10	594	285	266	266
query11	10585	10114	10212	10114
query12	134	86	81	81
query13	1633	358	351	351
query14	9613	7501	6714	6714
query15	239	195	182	182
query16	7757	267	264	264
query17	1900	526	519	519
query18	1908	291	268	268
query19	196	152	152	152
query20	91	83	81	81
query21	211	131	119	119
query22	4480	4038	4033	4033
query23	33637	33116	33228	33116
query24	12100	2855	2833	2833
query25	651	354	357	354
query26	1863	148	149	148
query27	2960	308	314	308
query28	7474	2019	2009	2009
query29	1158	632	595	595
query30	281	150	153	150
query31	950	717	758	717
query32	87	56	54	54
query33	756	285	275	275
query34	951	470	457	457
query35	708	608	597	597
query36	1056	944	946	944
query37	286	72	70	70
query38	2882	2754	2749	2749
query39	858	788	786	786
query40	291	126	132	126
query41	62	56	54	54
query42	125	127	100	100
query43	571	520	547	520
query44	1198	719	738	719
query45	189	164	172	164
query46	1094	742	739	739
query47	1863	1773	1809	1773
query48	364	298	288	288
query49	1189	415	392	392
query50	761	380	390	380
query51	6746	6702	6648	6648
query52	99	96	90	90
query53	355	292	286	286
query54	993	431	461	431
query55	78	76	76	76
query56	287	255	256	255
query57	1156	1042	1044	1042
query58	267	227	233	227
query59	3354	3148	3037	3037
query60	330	272	270	270
query61	95	87	92	87
query62	646	425	441	425
query63	324	286	286	286
query64	9827	2226	1800	1800
query65	3159	3102	3138	3102
query66	1344	331	371	331
query67	15580	15035	14920	14920
query68	4561	545	529	529
query69	551	397	403	397
query70	1050	1131	1088	1088
query71	393	264	265	264
query72	6974	5467	2733	2733
query73	744	317	324	317
query74	5900	5598	5512	5512
query75	3456	2685	2624	2624
query76	2677	951	887	887
query77	491	301	290	290
query78	10281	9967	9614	9614
query79	2471	516	508	508
query80	2237	455	453	453
query81	585	216	231	216
query82	1058	110	109	109
query83	306	170	170	170
query84	268	83	83	83
query85	1383	378	270	270
query86	460	311	318	311
query87	3261	3111	3113	3111
query88	3963	2304	2312	2304
query89	466	388	386	386
query90	1820	189	196	189
query91	128	97	99	97
query92	66	50	49	49
query93	1941	514	504	504
query94	1358	207	188	188
query95	407	316	319	316
query96	593	269	258	258
query97	3262	3127	3072	3072
query98	225	197	192	192
query99	1124	836	847	836
Total cold run time: 278838 ms
Total hot run time: 169487 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.07	0.04	0.04
query3	0.23	0.05	0.05
query4	1.67	0.07	0.08
query5	0.51	0.48	0.50
query6	1.14	0.73	0.73
query7	0.02	0.01	0.01
query8	0.06	0.04	0.04
query9	0.53	0.48	0.49
query10	0.55	0.55	0.54
query11	0.15	0.11	0.12
query12	0.15	0.12	0.12
query13	0.59	0.59	0.60
query14	0.75	0.76	0.80
query15	0.82	0.82	0.81
query16	0.38	0.37	0.35
query17	1.04	0.99	0.98
query18	0.23	0.24	0.27
query19	1.90	1.71	1.75
query20	0.01	0.01	0.01
query21	15.44	0.66	0.65
query22	3.74	6.76	2.77
query23	18.30	1.44	1.31
query24	1.90	0.26	0.21
query25	0.16	0.10	0.09
query26	0.26	0.19	0.18
query27	0.07	0.08	0.08
query28	13.33	1.01	1.01
query29	12.64	3.29	3.28
query30	0.27	0.06	0.06
query31	2.90	0.39	0.37
query32	3.28	0.46	0.47
query33	2.84	2.88	2.90
query34	17.26	4.45	4.47
query35	4.51	4.48	4.54
query36	0.65	0.50	0.48
query37	0.18	0.15	0.15
query38	0.16	0.14	0.15
query39	0.05	0.03	0.04
query40	0.18	0.14	0.14
query41	0.10	0.05	0.04
query42	0.06	0.05	0.05
query43	0.05	0.03	0.04
Total cold run time: 109.16 s
Total hot run time: 31.49 s

@xiaokang xiaokang changed the title [Fix](Variant) fix variant schema change may cause invalid block sche… [Fix](Variant) fix variant schema change may cause invalid block schema and write missing blocks Jun 16, 2024
Copy link
Contributor

@xiaokang xiaokang left a comment

Choose a reason for hiding this comment

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

pls add testcase

…ma and write missing blocks

1. update_rowset_schema should not update _context.tablet_schema, since it's used as src schema for schema change, if it's changed may lead to wrong schema with block
2. buffering block during schema change should merge first and then flush, otherwise  may lost current block
@eldenmoon
Copy link
Member Author

pls add testcase

done

@eldenmoon
Copy link
Member Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17955	4491	4378	4378
q2	2379	195	193	193
q3	10469	1102	1016	1016
q4	10183	819	798	798
q5	7527	2674	2650	2650
q6	220	140	140	140
q7	958	620	613	613
q8	9227	2066	2093	2066
q9	8790	6514	6484	6484
q10	8923	3755	3761	3755
q11	452	245	241	241
q12	401	246	233	233
q13	17760	2974	3007	2974
q14	271	211	213	211
q15	522	477	479	477
q16	527	386	386	386
q17	964	680	668	668
q18	7954	7525	7385	7385
q19	5167	1485	1479	1479
q20	662	311	324	311
q21	4895	3140	3914	3140
q22	386	338	335	335
Total cold run time: 116592 ms
Total hot run time: 39933 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4425	4248	4252	4248
q2	366	263	293	263
q3	2998	2764	2702	2702
q4	1892	1630	1614	1614
q5	5259	5293	5273	5273
q6	227	135	135	135
q7	2121	1736	1746	1736
q8	3206	3338	3308	3308
q9	8398	8335	8362	8335
q10	3891	3689	3679	3679
q11	581	490	482	482
q12	754	613	603	603
q13	17331	2984	3001	2984
q14	287	256	257	256
q15	520	477	488	477
q16	485	411	410	410
q17	1780	1500	1486	1486
q18	7699	7633	7325	7325
q19	1739	1545	1661	1545
q20	2015	1774	1784	1774
q21	5169	4699	4724	4699
q22	615	532	519	519
Total cold run time: 71758 ms
Total hot run time: 53853 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.48% (9002/24679)
Line Coverage: 28.02% (73741/263203)
Region Coverage: 27.49% (38306/139335)
Branch Coverage: 24.18% (19521/80732)
Coverage Report: http://coverage.selectdb-in.cc/coverage/7545c3c5ed321f099a16765815b5c63da074540a_7545c3c5ed321f099a16765815b5c63da074540a/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 172576 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 7545c3c5ed321f099a16765815b5c63da074540a, data reload: false

query1	938	373	379	373
query2	6456	2480	2313	2313
query3	6642	201	204	201
query4	20102	17457	17326	17326
query5	4147	485	471	471
query6	249	161	172	161
query7	4589	308	294	294
query8	310	282	289	282
query9	8489	2389	2357	2357
query10	630	314	329	314
query11	10618	10133	10280	10133
query12	133	89	83	83
query13	1627	362	364	362
query14	10160	7438	6736	6736
query15	233	189	184	184
query16	7779	271	275	271
query17	1894	536	508	508
query18	1931	271	268	268
query19	205	153	153	153
query20	95	85	83	83
query21	208	128	128	128
query22	4222	4096	4259	4096
query23	33634	33194	33109	33109
query24	11896	2872	2763	2763
query25	664	365	395	365
query26	1790	158	155	155
query27	2978	327	316	316
query28	7539	2045	2032	2032
query29	1077	640	642	640
query30	262	149	151	149
query31	971	719	766	719
query32	102	55	56	55
query33	765	287	277	277
query34	958	475	476	475
query35	744	647	622	622
query36	1092	924	943	924
query37	197	71	72	71
query38	2892	2748	2781	2748
query39	846	788	797	788
query40	290	128	139	128
query41	55	53	51	51
query42	118	99	103	99
query43	571	558	561	558
query44	1264	724	731	724
query45	193	170	170	170
query46	1101	715	722	715
query47	1874	1752	1766	1752
query48	389	301	308	301
query49	1190	418	422	418
query50	766	388	395	388
query51	6859	6761	6631	6631
query52	104	93	97	93
query53	357	299	300	299
query54	1000	461	460	460
query55	79	76	74	74
query56	307	309	267	267
query57	1145	1016	1078	1016
query58	249	245	253	245
query59	3354	3120	3079	3079
query60	288	272	278	272
query61	92	89	91	89
query62	650	445	436	436
query63	319	293	289	289
query64	9952	2293	1752	1752
query65	3177	3126	3077	3077
query66	1374	332	344	332
query67	15325	15171	14916	14916
query68	4580	548	547	547
query69	453	310	303	303
query70	1113	1092	1117	1092
query71	384	279	275	275
query72	7089	5836	5372	5372
query73	751	323	324	323
query74	5969	5565	5441	5441
query75	3385	2681	2639	2639
query76	2682	1030	949	949
query77	462	297	294	294
query78	10264	9824	9763	9763
query79	2540	515	515	515
query80	1040	476	477	476
query81	552	224	220	220
query82	689	107	104	104
query83	233	167	169	167
query84	236	82	85	82
query85	1920	286	274	274
query86	501	322	318	318
query87	3286	3082	3108	3082
query88	4150	2357	2351	2351
query89	494	375	388	375
query90	1813	194	192	192
query91	128	97	99	97
query92	66	54	49	49
query93	2261	520	517	517
query94	1221	191	190	190
query95	420	312	320	312
query96	598	267	262	262
query97	3244	3050	3043	3043
query98	222	200	197	197
query99	1223	827	819	819
Total cold run time: 276475 ms
Total hot run time: 172576 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.69	0.07	0.07
query5	0.49	0.49	0.48
query6	1.13	0.73	0.73
query7	0.02	0.01	0.01
query8	0.06	0.05	0.05
query9	0.54	0.49	0.50
query10	0.54	0.53	0.52
query11	0.16	0.12	0.12
query12	0.15	0.11	0.12
query13	0.60	0.59	0.59
query14	0.80	0.76	0.80
query15	0.84	0.84	0.81
query16	0.37	0.37	0.38
query17	1.02	1.03	1.05
query18	0.23	0.23	0.26
query19	1.86	1.79	1.82
query20	0.01	0.01	0.01
query21	15.44	0.66	0.66
query22	4.41	7.42	1.65
query23	18.25	1.38	1.29
query24	2.20	0.21	0.22
query25	0.15	0.08	0.09
query26	0.27	0.18	0.18
query27	0.08	0.08	0.08
query28	13.21	1.03	1.00
query29	12.62	3.24	3.24
query30	0.26	0.06	0.05
query31	2.89	0.39	0.39
query32	3.28	0.48	0.47
query33	2.88	2.93	2.88
query34	17.01	4.44	4.50
query35	4.46	4.48	4.45
query36	0.65	0.48	0.48
query37	0.18	0.15	0.15
query38	0.15	0.15	0.14
query39	0.04	0.03	0.04
query40	0.17	0.14	0.15
query41	0.09	0.05	0.05
query42	0.06	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.65 s
Total hot run time: 30.43 s

Copy link
Contributor

@xiaokang xiaokang left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 18, 2024
@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

@xiaokang xiaokang merged commit f328804 into apache:master Jun 19, 2024
@eldenmoon eldenmoon deleted the fix-sc branch June 19, 2024 03:48
eldenmoon added a commit to eldenmoon/incubator-doris that referenced this pull request Jun 19, 2024
…ma and write missing blocks (apache#36317)

buffering block during schema change should merge first and then
flush, otherwise may lost current block
xiaokang pushed a commit that referenced this pull request Jun 19, 2024
dataroaring pushed a commit that referenced this pull request Jun 21, 2024
…ma and write missing blocks (#36317)

1. update_rowset_schema should not update _context.tablet_schema, since
it's used as src schema for schema change, if it's changed may lead to
wrong schema with block
2. buffering block during schema change should merge first and then
flush, otherwise may lost current block
eldenmoon added a commit to eldenmoon/incubator-doris that referenced this pull request Jul 10, 2024
…ma and write missing blocks (apache#36317)

1. update_rowset_schema should not update _context.tablet_schema, since
it's used as src schema for schema change, if it's changed may lead to
wrong schema with block
2. buffering block during schema change should merge first and then
flush, otherwise may lost current block
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/2.1.4-merged dev/3.0.0-merged p0_w reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants