Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](partial update) fix data correctness risk when load delete sign data into a table with sequence col #32574

Merged

Conversation

zhannngchen
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

In the current implementation of partial column update, in order to improve the efficiency of the load job, for rows
with delete sign, will automatically ignore the missing columns of the data complement, but when the table has sequence columns, the sequence columns are required to complement.
If a row is written with a delete sign, but the sequence columns are not filled in, the merge-on-read policy compaction will result in incorrect data.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

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

@zhannngchen
Copy link
Contributor Author

run buildall

Copy link
Contributor

@gavinchou gavinchou left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.27% (8727/24744)
Line Coverage: 27.08% (71423/263739)
Region Coverage: 26.33% (37074/140816)
Branch Coverage: 23.23% (18955/81588)
Coverage Report: http://coverage.selectdb-in.cc/coverage/706a7544f5e195e615d8c2a66df2c00a767773a3_706a7544f5e195e615d8c2a66df2c00a767773a3/report/index.html

@zhannngchen
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

@zhannngchen
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.26% (8728/24750)
Line Coverage: 27.07% (71434/263846)
Region Coverage: 26.31% (37066/140871)
Branch Coverage: 23.22% (18953/81618)
Coverage Report: http://coverage.selectdb-in.cc/coverage/cd718cc1bac2bda3603d3fbbb143919d14730105_cd718cc1bac2bda3603d3fbbb143919d14730105/report/index.html

@zhannngchen
Copy link
Contributor Author

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.27% (8729/24749)
Line Coverage: 27.09% (71487/263882)
Region Coverage: 26.33% (37086/140876)
Branch Coverage: 23.23% (18961/81624)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0b75a3e8b49a43d3e96cb80dcd4c5bb1956fbe9d_0b75a3e8b49a43d3e96cb80dcd4c5bb1956fbe9d/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17588	4945	4160	4160
q2	2027	142	140	140
q3	10608	1134	1179	1134
q4	10231	781	760	760
q5	7473	2975	2984	2975
q6	209	124	122	122
q7	1052	583	556	556
q8	9315	2037	1977	1977
q9	7077	6496	6460	6460
q10	8348	3398	3465	3398
q11	441	220	212	212
q12	383	197	192	192
q13	17777	2821	2837	2821
q14	233	199	209	199
q15	509	465	458	458
q16	465	360	358	358
q17	957	640	548	548
q18	7233	6535	6334	6334
q19	3949	1370	1434	1370
q20	531	268	249	249
q21	3515	2822	2993	2822
q22	370	298	296	296
Total cold run time: 110291 ms
Total hot run time: 37541 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4153	4111	4079	4079
q2	328	224	221	221
q3	2969	2814	2810	2810
q4	1834	1538	1525	1525
q5	5202	5272	5248	5248
q6	198	115	118	115
q7	2237	1848	1880	1848
q8	3196	3294	3317	3294
q9	8649	8604	8623	8604
q10	3696	3713	3670	3670
q11	536	455	439	439
q12	721	526	557	526
q13	16916	2853	2844	2844
q14	282	244	253	244
q15	487	443	448	443
q16	448	408	421	408
q17	1752	1496	1456	1456
q18	7488	7204	7116	7116
q19	4198	1529	1585	1529
q20	1903	1696	1681	1681
q21	5044	4822	4786	4786
q22	550	449	473	449
Total cold run time: 72787 ms
Total hot run time: 53335 ms

@doris-robot
Copy link

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

query1	918	359	343	343
query2	7422	2038	1991	1991
query3	6717	216	211	211
query4	31198	20548	20613	20548
query5	4319	404	392	392
query6	267	171	165	165
query7	4626	289	287	287
query8	227	173	171	171
query9	9950	2270	2267	2267
query10	465	246	262	246
query11	17181	14030	14101	14030
query12	137	91	86	86
query13	1630	430	416	416
query14	11743	11165	10542	10542
query15	244	210	190	190
query16	8029	257	258	257
query17	1949	555	520	520
query18	2031	281	268	268
query19	208	144	154	144
query20	86	84	85	84
query21	199	126	129	126
query22	4625	4424	4492	4424
query23	31734	31176	31034	31034
query24	10642	2858	2816	2816
query25	592	379	383	379
query26	719	154	153	153
query27	2287	353	344	344
query28	6315	1878	1870	1870
query29	869	670	625	625
query30	298	143	145	143
query31	961	729	730	729
query32	87	59	56	56
query33	668	258	254	254
query34	874	471	476	471
query35	801	604	593	593
query36	1005	873	860	860
query37	107	78	75	75
query38	3554	3449	3425	3425
query39	1449	1436	1372	1372
query40	206	111	114	111
query41	52	47	52	47
query42	103	97	92	92
query43	505	462	481	462
query44	1125	726	727	726
query45	276	265	258	258
query46	1054	697	679	679
query47	1669	1580	1584	1580
query48	445	368	365	365
query49	1088	336	338	336
query50	752	376	372	372
query51	6797	6573	6618	6573
query52	102	93	88	88
query53	342	277	273	273
query54	323	243	261	243
query55	86	78	78	78
query56	255	234	235	234
query57	1069	1021	1002	1002
query58	230	203	206	203
query59	2901	2674	2583	2583
query60	286	253	259	253
query61	138	112	127	112
query62	596	399	388	388
query63	307	279	276	276
query64	5380	3867	3993	3867
query65	3080	3006	3006	3006
query66	858	358	355	355
query67	14756	14448	14595	14448
query68	7500	529	522	522
query69	623	379	376	376
query70	1245	1131	1134	1131
query71	534	291	274	274
query72	6391	2642	2491	2491
query73	752	311	320	311
query74	7500	6562	6587	6562
query75	4445	2930	2838	2838
query76	4928	1008	999	999
query77	650	266	261	261
query78	10246	9651	9594	9594
query79	10817	519	527	519
query80	1840	383	371	371
query81	532	208	208	208
query82	867	202	198	198
query83	212	143	137	137
query84	289	73	79	73
query85	1308	346	313	313
query86	473	319	274	274
query87	3685	3512	3528	3512
query88	5147	2294	2271	2271
query89	505	354	364	354
query90	1962	173	170	170
query91	159	133	132	132
query92	63	46	45	45
query93	7411	498	483	483
query94	1213	174	172	172
query95	430	317	316	316
query96	612	278	258	258
query97	3060	2835	2857	2835
query98	226	210	209	209
query99	1094	756	741	741
Total cold run time: 308633 ms
Total hot run time: 180867 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18104	4793	4238	4238
q2	2289	154	155	154
q3	11620	1186	1237	1186
q4	10643	756	728	728
q5	7771	3088	3019	3019
q6	206	129	127	127
q7	1060	611	597	597
q8	9514	2047	2047	2047
q9	7229	6619	6584	6584
q10	9694	3513	3574	3513
q11	435	238	218	218
q12	420	202	193	193
q13	17795	2857	2869	2857
q14	242	203	209	203
q15	514	457	470	457
q16	451	358	361	358
q17	952	537	632	537
q18	7345	6626	6515	6515
q19	3068	1482	1424	1424
q20	544	255	240	240
q21	3701	2999	2939	2939
q22	345	304	305	304
Total cold run time: 113942 ms
Total hot run time: 38438 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4106	4046	4047	4046
q2	317	224	222	222
q3	2954	2868	2829	2829
q4	1823	1493	1514	1493
q5	5275	5264	5274	5264
q6	194	116	117	116
q7	2249	1884	1887	1884
q8	3151	3312	3309	3309
q9	8638	8597	8586	8586
q10	3716	3680	3681	3680
q11	547	436	446	436
q12	738	566	569	566
q13	16918	2852	2866	2852
q14	281	255	245	245
q15	497	456	452	452
q16	478	421	427	421
q17	1744	1494	1484	1484
q18	7501	7267	7251	7251
q19	1633	1587	1495	1495
q20	1914	1708	1729	1708
q21	4724	4578	4727	4578
q22	527	472	451	451
Total cold run time: 69925 ms
Total hot run time: 53368 ms

@doris-robot
Copy link

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

query1	922	359	342	342
query2	7813	2072	1966	1966
query3	6711	218	210	210
query4	31079	20806	20779	20779
query5	4301	406	496	406
query6	265	195	178	178
query7	4619	298	286	286
query8	227	169	190	169
query9	9978	2276	2246	2246
query10	472	244	237	237
query11	15203	14237	14143	14143
query12	142	96	85	85
query13	1643	418	420	418
query14	11418	10407	10606	10407
query15	248	206	198	198
query16	7965	262	261	261
query17	1931	571	561	561
query18	2000	283	283	283
query19	228	157	158	157
query20	98	91	87	87
query21	199	132	133	132
query22	4652	4494	4465	4465
query23	32031	31236	31356	31236
query24	10896	2850	2832	2832
query25	611	375	384	375
query26	1220	159	157	157
query27	2544	365	354	354
query28	7541	1929	1916	1916
query29	867	655	630	630
query30	295	145	147	145
query31	971	728	709	709
query32	94	59	55	55
query33	855	262	266	262
query34	975	476	489	476
query35	837	602	610	602
query36	980	847	854	847
query37	123	78	75	75
query38	3593	3484	3430	3430
query39	1424	1389	1368	1368
query40	213	116	115	115
query41	51	47	47	47
query42	103	100	105	100
query43	501	466	459	459
query44	1308	708	719	708
query45	276	251	262	251
query46	1081	672	684	672
query47	1672	1601	1589	1589
query48	430	363	352	352
query49	1137	346	346	346
query50	760	373	374	373
query51	6726	6568	6640	6568
query52	109	86	94	86
query53	342	281	280	280
query54	315	248	266	248
query55	84	81	80	80
query56	262	233	245	233
query57	1101	1014	992	992
query58	230	203	211	203
query59	2806	2603	2689	2603
query60	267	322	258	258
query61	115	112	116	112
query62	607	418	414	414
query63	298	282	288	282
query64	5643	3874	3627	3627
query65	3057	2977	3013	2977
query66	872	340	344	340
query67	15056	14440	14344	14344
query68	8361	525	531	525
query69	608	379	380	379
query70	1264	1159	1125	1125
query71	518	276	281	276
query72	6653	2680	2509	2509
query73	725	319	324	319
query74	6872	6532	6631	6532
query75	4448	2844	2850	2844
query76	4960	815	886	815
query77	660	260	253	253
query78	10299	9493	9693	9493
query79	11814	511	516	511
query80	1854	389	380	380
query81	538	208	218	208
query82	889	198	205	198
query83	214	142	139	139
query84	290	75	77	75
query85	1514	330	319	319
query86	476	290	294	290
query87	3750	3535	3509	3509
query88	5412	2319	2293	2293
query89	497	358	380	358
query90	1951	175	172	172
query91	160	135	133	133
query92	61	46	47	46
query93	7528	501	478	478
query94	1244	179	176	176
query95	438	330	323	323
query96	616	265	269	265
query97	3039	2883	2851	2851
query98	227	215	203	203
query99	1121	741	729	729
Total cold run time: 312394 ms
Total hot run time: 180870 ms

Copy link
Contributor

@liaoxin01 liaoxin01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 21, 2024
@zhannngchen zhannngchen merged commit bcef00d into apache:master Mar 21, 2024
23 of 28 checks passed
yiguolei pushed a commit that referenced this pull request Mar 22, 2024
seawinde pushed a commit to seawinde/doris that referenced this pull request Mar 22, 2024
zhannngchen added a commit to zhannngchen/incubator-doris that referenced this pull request Jun 13, 2024
zhannngchen added a commit that referenced this pull request Jun 13, 2024
…sign data into a table with sequence col (#32574) (#36228)

cherry-pick #32574
mongo360 pushed a commit to mongo360/doris that referenced this pull request Aug 16, 2024
bobhan1 pushed a commit to bobhan1/doris that referenced this pull request Jan 20, 2025
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.0.12-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants