Skip to content

Conversation

@Yukang-Lian
Copy link
Collaborator

Proposed changes

close #34551

Problem: As shown in the issue above, if a key deleted by a delete statement is written to by updating only certain columns, the data will not display correctly.

Reason: The delete statement deletes the data by writing a delete predicate, which is stored in the rowset meta and applied during data retrieval to filter the data. However, partial column updates do not consider the effect of the delete predicate when reading the original data. The imported key should be considered as a new key (since it has already been deleted), but it is actually treated as an old key. Therefore, only some columns are updated, leading to incorrect results.

Solution: Consider the delete predicate during partial column updates, but this method will result in reading more columns, as shown in #35766. Thus, in this PR, we change the delete operation in the mow table from writing a delete predicate to writing a delete sign, which effectively resolves the issue.

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

@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17613	4402	4306	4306
q2	2032	199	194	194
q3	10416	1267	1173	1173
q4	10179	841	815	815
q5	7490	2774	2782	2774
q6	226	139	139	139
q7	975	640	623	623
q8	9215	2187	2107	2107
q9	9403	6776	6763	6763
q10	9517	3921	3896	3896
q11	444	251	244	244
q12	486	233	236	233
q13	17417	3278	3259	3259
q14	266	209	219	209
q15	502	482	481	481
q16	486	395	401	395
q17	1005	635	632	632
q18	8610	7899	8001	7899
q19	6793	1331	1484	1331
q20	655	332	341	332
q21	5169	4107	4167	4107
q22	412	343	361	343
Total cold run time: 119311 ms
Total hot run time: 42255 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4578	4491	4416	4416
q2	371	270	265	265
q3	3206	2983	2854	2854
q4	1907	1665	1681	1665
q5	5503	5595	5548	5548
q6	220	127	127	127
q7	2203	1858	1881	1858
q8	3255	3435	3383	3383
q9	8705	8748	8728	8728
q10	4066	3833	3682	3682
q11	592	481	485	481
q12	831	648	639	639
q13	17107	3114	3144	3114
q14	320	280	262	262
q15	521	476	488	476
q16	487	446	438	438
q17	1849	1530	1508	1508
q18	8010	7518	7510	7510
q19	1691	1446	1576	1446
q20	2124	1827	1776	1776
q21	8997	4714	4771	4714
q22	630	542	560	542
Total cold run time: 77173 ms
Total hot run time: 55432 ms

@doris-robot
Copy link

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

query1	911	381	379	379
query2	6456	2408	2387	2387
query3	6642	207	206	206
query4	20448	17409	17444	17409
query5	4124	461	440	440
query6	259	160	153	153
query7	4609	290	286	286
query8	294	273	267	267
query9	8513	2446	2413	2413
query10	460	301	273	273
query11	10613	9973	10074	9973
query12	137	94	88	88
query13	1640	380	369	369
query14	9602	7687	7935	7687
query15	229	191	185	185
query16	7781	269	272	269
query17	1739	519	517	517
query18	1856	271	267	267
query19	199	152	156	152
query20	97	86	86	86
query21	205	128	130	128
query22	4424	4030	3976	3976
query23	33741	33123	33271	33123
query24	10899	2870	2766	2766
query25	624	368	356	356
query26	1159	154	158	154
query27	2810	320	322	320
query28	7404	2078	2072	2072
query29	882	612	596	596
query30	287	149	151	149
query31	958	764	737	737
query32	96	52	52	52
query33	759	286	276	276
query34	965	496	486	486
query35	737	624	644	624
query36	1085	947	915	915
query37	152	68	72	68
query38	2864	2785	2728	2728
query39	863	821	815	815
query40	209	122	121	121
query41	53	56	50	50
query42	122	97	97	97
query43	572	550	550	550
query44	1175	729	750	729
query45	199	167	173	167
query46	1064	727	721	721
query47	1885	1762	1796	1762
query48	384	299	300	299
query49	1075	412	401	401
query50	778	391	392	391
query51	6898	6773	6639	6639
query52	102	89	89	89
query53	357	287	295	287
query54	900	446	437	437
query55	74	73	71	71
query56	315	256	255	255
query57	1153	1026	1074	1026
query58	275	291	237	237
query59	3398	3061	2997	2997
query60	277	266	273	266
query61	95	109	89	89
query62	633	425	446	425
query63	312	293	289	289
query64	8813	2248	1713	1713
query65	3189	3090	3115	3090
query66	870	333	324	324
query67	15456	14915	14944	14915
query68	4514	539	533	533
query69	456	306	302	302
query70	1194	1132	1137	1132
query71	410	279	293	279
query72	7190	4432	2555	2555
query73	735	323	321	321
query74	5922	5586	5586	5586
query75	3303	2666	2713	2666
query76	2564	986	863	863
query77	457	310	291	291
query78	10320	9772	9727	9727
query79	2462	515	517	515
query80	1340	463	466	463
query81	550	222	220	220
query82	844	105	98	98
query83	230	172	170	170
query84	250	91	85	85
query85	1254	276	268	268
query86	483	309	311	309
query87	3252	3116	3088	3088
query88	4330	2354	2348	2348
query89	475	398	384	384
query90	1744	189	191	189
query91	127	96	101	96
query92	66	49	49	49
query93	1839	509	505	505
query94	1133	189	191	189
query95	415	329	321	321
query96	588	269	272	269
query97	3220	3018	3023	3018
query98	258	217	228	217
query99	1130	854	849	849
Total cold run time: 271211 ms
Total hot run time: 170489 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 d8665f410df30102187da7e453bd008c3b2ac13b, data reload: false

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.07	0.06
query5	0.49	0.48	0.50
query6	1.13	0.72	0.73
query7	0.02	0.02	0.01
query8	0.05	0.04	0.04
query9	0.53	0.50	0.49
query10	0.52	0.55	0.52
query11	0.15	0.11	0.12
query12	0.15	0.12	0.12
query13	0.59	0.59	0.59
query14	0.79	0.78	0.77
query15	0.83	0.82	0.82
query16	0.36	0.36	0.36
query17	0.96	0.96	1.00
query18	0.23	0.25	0.24
query19	1.76	1.75	1.75
query20	0.01	0.01	0.01
query21	15.51	0.68	0.66
query22	4.27	7.32	1.66
query23	18.30	1.35	1.26
query24	1.60	0.28	0.25
query25	0.16	0.09	0.08
query26	0.27	0.18	0.18
query27	0.07	0.07	0.08
query28	13.30	1.02	1.00
query29	13.17	3.31	3.29
query30	0.25	0.05	0.06
query31	2.87	0.40	0.37
query32	3.28	0.46	0.48
query33	2.91	2.94	2.94
query34	17.17	4.47	4.44
query35	4.48	4.52	4.59
query36	0.72	0.48	0.48
query37	0.17	0.15	0.14
query38	0.14	0.13	0.14
query39	0.04	0.03	0.03
query40	0.17	0.14	0.14
query41	0.09	0.04	0.04
query42	0.05	0.04	0.04
query43	0.04	0.03	0.04
Total cold run time: 109.63 s
Total hot run time: 30.43 s

@Yukang-Lian Yukang-Lian force-pushed the Fix-Partial-Update-Delete-Predicate-Delete-Sign branch from d8665f4 to 8387e79 Compare June 15, 2024 14:44
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17609	4357	4267	4267
q2	2019	188	193	188
q3	10444	1158	1152	1152
q4	10185	775	766	766
q5	7448	2647	2629	2629
q6	219	133	133	133
q7	944	618	609	609
q8	9224	2076	2079	2076
q9	8821	6508	6437	6437
q10	8993	3734	3699	3699
q11	472	243	238	238
q12	479	242	224	224
q13	17765	2979	2949	2949
q14	263	221	218	218
q15	518	466	485	466
q16	510	377	391	377
q17	946	645	675	645
q18	7865	7313	7375	7313
q19	3591	1478	1456	1456
q20	651	309	321	309
q21	4874	3193	3218	3193
q22	392	332	336	332
Total cold run time: 114232 ms
Total hot run time: 39676 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4318	4247	4262	4247
q2	369	261	262	261
q3	2959	2774	2786	2774
q4	2001	1680	1720	1680
q5	5505	5574	5492	5492
q6	228	125	127	125
q7	2232	1786	1875	1786
q8	3349	3392	3400	3392
q9	8616	8645	8704	8645
q10	4101	3833	3937	3833
q11	596	490	500	490
q12	763	597	607	597
q13	16805	3197	3124	3124
q14	327	286	264	264
q15	554	489	475	475
q16	489	437	428	428
q17	1797	1491	1486	1486
q18	8140	8034	7821	7821
q19	4080	1551	1647	1551
q20	2065	1893	1863	1863
q21	5032	5067	4815	4815
q22	598	537	582	537
Total cold run time: 74924 ms
Total hot run time: 55686 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173875 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 8387e799ca8de84f66c030acd6d3051c7d4ad86e, data reload: false

query1	925	381	372	372
query2	6457	2469	2545	2469
query3	6632	201	205	201
query4	20128	17389	17355	17355
query5	3578	460	457	457
query6	237	157	156	156
query7	4570	304	292	292
query8	326	292	297	292
query9	8532	2390	2361	2361
query10	587	319	274	274
query11	10315	10171	9981	9981
query12	117	83	80	80
query13	1626	366	350	350
query14	10048	7579	7505	7505
query15	226	191	188	188
query16	7823	266	264	264
query17	1903	521	502	502
query18	1957	264	270	264
query19	191	150	149	149
query20	90	80	80	80
query21	210	156	131	131
query22	4447	4125	4020	4020
query23	33781	33824	33720	33720
query24	10336	2936	2858	2858
query25	570	405	371	371
query26	703	157	150	150
query27	2262	319	337	319
query28	5938	2091	2094	2091
query29	895	647	640	640
query30	227	155	168	155
query31	947	773	736	736
query32	92	55	57	55
query33	702	282	289	282
query34	867	504	478	478
query35	750	632	626	626
query36	1139	954	951	951
query37	147	72	71	71
query38	2970	2848	2795	2795
query39	891	806	809	806
query40	213	123	125	123
query41	58	50	56	50
query42	115	94	95	94
query43	589	538	552	538
query44	1084	713	716	713
query45	198	168	162	162
query46	1070	749	724	724
query47	1888	1809	1771	1771
query48	362	299	288	288
query49	842	396	392	392
query50	760	387	388	387
query51	6752	6579	6642	6579
query52	97	101	89	89
query53	356	285	281	281
query54	868	465	436	436
query55	74	71	73	71
query56	273	244	250	244
query57	1117	1042	1057	1042
query58	248	266	232	232
query59	3469	3308	3154	3154
query60	290	257	265	257
query61	115	112	107	107
query62	606	440	451	440
query63	321	287	289	287
query64	8581	2318	1791	1791
query65	3195	3128	3128	3128
query66	739	333	321	321
query67	15437	15001	14852	14852
query68	6065	542	541	541
query69	605	449	392	392
query70	1194	1061	1168	1061
query71	500	267	265	265
query72	7074	5532	5370	5370
query73	806	318	314	314
query74	5908	5502	5572	5502
query75	3956	2640	2616	2616
query76	3850	918	900	900
query77	635	296	290	290
query78	10335	9861	9648	9648
query79	2336	523	521	521
query80	2313	454	447	447
query81	568	231	218	218
query82	759	98	103	98
query83	303	162	166	162
query84	273	84	85	84
query85	1196	282	266	266
query86	452	330	320	320
query87	3272	3086	3096	3086
query88	3648	2321	2332	2321
query89	477	374	374	374
query90	1728	185	184	184
query91	128	101	100	100
query92	61	50	48	48
query93	2823	511	501	501
query94	1025	188	189	188
query95	393	312	305	305
query96	588	265	267	265
query97	3200	3095	3040	3040
query98	215	194	194	194
query99	1199	854	883	854
Total cold run time: 271744 ms
Total hot run time: 173875 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.04	0.04
query3	0.22	0.05	0.05
query4	1.69	0.06	0.08
query5	0.50	0.49	0.48
query6	1.14	0.72	0.72
query7	0.02	0.01	0.01
query8	0.06	0.05	0.04
query9	0.54	0.49	0.48
query10	0.55	0.54	0.54
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.60	0.60	0.60
query14	0.76	0.79	0.78
query15	0.84	0.80	0.81
query16	0.36	0.34	0.38
query17	0.95	1.05	1.01
query18	0.22	0.26	0.21
query19	1.77	1.71	1.74
query20	0.01	0.00	0.01
query21	15.41	0.65	0.66
query22	4.38	7.31	1.74
query23	18.31	1.46	1.30
query24	2.13	0.23	0.21
query25	0.16	0.09	0.08
query26	0.27	0.18	0.18
query27	0.08	0.07	0.08
query28	13.21	1.03	1.00
query29	12.59	3.31	3.29
query30	0.26	0.06	0.06
query31	2.86	0.39	0.38
query32	3.30	0.46	0.47
query33	2.86	2.86	2.88
query34	17.12	4.39	4.39
query35	4.49	4.51	4.48
query36	0.65	0.46	0.47
query37	0.18	0.15	0.15
query38	0.15	0.15	0.14
query39	0.04	0.03	0.03
query40	0.17	0.14	0.14
query41	0.09	0.04	0.05
query42	0.06	0.05	0.04
query43	0.04	0.04	0.05
Total cold run time: 109.46 s
Total hot run time: 30.32 s

@Yukang-Lian Yukang-Lian force-pushed the Fix-Partial-Update-Delete-Predicate-Delete-Sign branch from 8387e79 to 485badc Compare June 17, 2024 19:28
@Yukang-Lian
Copy link
Collaborator Author

run buildall

2 similar comments
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@Yukang-Lian
Copy link
Collaborator Author

run buildall

@Yukang-Lian Yukang-Lian force-pushed the Fix-Partial-Update-Delete-Predicate-Delete-Sign branch from f92a1a3 to 4df1572 Compare June 18, 2024 08:26
@Yukang-Lian
Copy link
Collaborator Author

run buildall

1 similar comment
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18020	4398	4383	4383
q2	2355	201	203	201
q3	10445	1075	1111	1075
q4	10187	792	834	792
q5	7478	2656	2605	2605
q6	220	137	139	137
q7	942	607	603	603
q8	9232	2043	2080	2043
q9	8919	6454	6473	6454
q10	8873	3724	3726	3724
q11	449	236	247	236
q12	401	231	234	231
q13	18764	2962	2987	2962
q14	264	225	226	225
q15	525	479	482	479
q16	521	389	379	379
q17	959	711	660	660
q18	8218	7458	7429	7429
q19	5278	1494	1386	1386
q20	650	310	335	310
q21	4871	3172	3822	3172
q22	391	338	337	337
Total cold run time: 117962 ms
Total hot run time: 39823 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4306	4198	4213	4198
q2	375	278	262	262
q3	2985	2768	2790	2768
q4	1872	1587	1587	1587
q5	5259	5276	5262	5262
q6	213	128	128	128
q7	2119	1768	1703	1703
q8	3161	3302	3289	3289
q9	8278	8320	8299	8299
q10	3842	3599	3703	3599
q11	602	486	501	486
q12	788	622	629	622
q13	17525	3020	3012	3012
q14	291	262	267	262
q15	522	467	486	467
q16	460	420	419	419
q17	1771	1478	1460	1460
q18	7516	7468	7495	7468
q19	1850	1517	1543	1517
q20	2023	1784	1807	1784
q21	4948	4624	4694	4624
q22	619	550	533	533
Total cold run time: 71325 ms
Total hot run time: 53749 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 170324 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 3e5bbe13a6fcbc3b273651786710a9a77403bd18, data reload: false

query1	921	376	370	370
query2	6456	2429	2320	2320
query3	6654	205	208	205
query4	19141	17194	17101	17101
query5	4163	482	480	480
query6	243	162	160	160
query7	4602	294	297	294
query8	357	299	291	291
query9	8470	2416	2401	2401
query10	615	312	286	286
query11	10481	9959	9991	9959
query12	132	88	84	84
query13	1696	362	368	362
query14	9426	7459	7414	7414
query15	239	183	183	183
query16	7806	270	265	265
query17	1904	547	535	535
query18	1962	269	270	269
query19	189	154	161	154
query20	95	82	81	81
query21	210	127	120	120
query22	4210	4111	4032	4032
query23	33741	33235	33140	33140
query24	11871	2805	2837	2805
query25	662	355	361	355
query26	1781	158	153	153
query27	2979	320	313	313
query28	7692	2039	2028	2028
query29	1094	622	602	602
query30	278	154	150	150
query31	1000	741	738	738
query32	93	54	57	54
query33	785	280	278	278
query34	975	478	461	461
query35	729	626	622	622
query36	1106	944	910	910
query37	182	74	74	74
query38	2874	2741	2753	2741
query39	848	790	814	790
query40	275	129	126	126
query41	56	55	52	52
query42	121	98	99	98
query43	582	561	564	561
query44	1200	717	733	717
query45	193	161	158	158
query46	1068	709	735	709
query47	1837	1762	1762	1762
query48	374	298	299	298
query49	1204	404	398	398
query50	759	379	379	379
query51	6851	6803	6659	6659
query52	102	94	89	89
query53	368	289	291	289
query54	953	443	435	435
query55	74	77	72	72
query56	284	256	261	256
query57	1134	1072	1040	1040
query58	265	250	246	246
query59	3439	3084	3238	3084
query60	312	272	270	270
query61	117	90	89	89
query62	650	432	440	432
query63	317	285	286	285
query64	9881	2226	1808	1808
query65	3193	3088	3084	3084
query66	1381	337	355	337
query67	15386	15045	15064	15045
query68	4563	556	533	533
query69	461	332	317	317
query70	1194	1161	1135	1135
query71	388	273	268	268
query72	7064	2817	2633	2633
query73	743	321	321	321
query74	5949	5484	5507	5484
query75	3378	2650	2671	2650
query76	2551	920	843	843
query77	466	318	302	302
query78	10785	10045	9893	9893
query79	2485	518	517	517
query80	1725	492	463	463
query81	556	225	219	219
query82	660	108	105	105
query83	280	178	169	169
query84	278	91	85	85
query85	1767	279	336	279
query86	500	291	304	291
query87	3251	3056	3071	3056
query88	4121	2330	2338	2330
query89	460	375	373	373
query90	1833	186	199	186
query91	131	100	100	100
query92	65	50	48	48
query93	1986	532	504	504
query94	1273	185	186	185
query95	412	310	316	310
query96	590	267	264	264
query97	3275	3078	3090	3078
query98	219	203	194	194
query99	1325	832	831	831
Total cold run time: 275772 ms
Total hot run time: 170324 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.08	0.03	0.04
query3	0.22	0.06	0.06
query4	1.65	0.08	0.08
query5	0.50	0.47	0.50
query6	1.13	0.73	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.55	0.50	0.49
query10	0.54	0.55	0.54
query11	0.17	0.11	0.12
query12	0.15	0.12	0.12
query13	0.59	0.59	0.60
query14	0.77	0.79	0.77
query15	0.84	0.82	0.81
query16	0.35	0.35	0.35
query17	0.96	1.00	1.00
query18	0.23	0.24	0.22
query19	1.80	1.66	1.69
query20	0.01	0.02	0.02
query21	15.47	0.65	0.63
query22	4.39	6.46	2.31
query23	18.24	1.31	1.28
query24	2.19	0.22	0.22
query25	0.15	0.09	0.09
query26	0.26	0.19	0.18
query27	0.08	0.08	0.08
query28	13.20	1.01	0.99
query29	12.60	3.30	3.30
query30	0.26	0.08	0.07
query31	2.84	0.39	0.39
query32	3.28	0.46	0.46
query33	2.90	2.92	2.92
query34	17.11	4.42	4.48
query35	4.50	4.51	4.42
query36	0.66	0.46	0.45
query37	0.19	0.15	0.14
query38	0.15	0.14	0.15
query39	0.04	0.04	0.04
query40	0.18	0.14	0.14
query41	0.10	0.05	0.04
query42	0.06	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.54 s
Total hot run time: 30.92 s

@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17656	4413	4436	4413
q2	2034	192	197	192
q3	10499	1145	1143	1143
q4	10193	828	862	828
q5	7457	2691	2641	2641
q6	224	145	143	143
q7	967	632	599	599
q8	9240	2061	2087	2061
q9	8675	6467	6473	6467
q10	8999	3713	3693	3693
q11	446	235	239	235
q12	452	236	231	231
q13	18817	2994	2977	2977
q14	270	232	234	232
q15	511	484	477	477
q16	529	392	380	380
q17	975	649	750	649
q18	8364	8054	7829	7829
q19	7420	1402	1510	1402
q20	693	333	352	333
q21	5043	3358	4059	3358
q22	410	345	345	345
Total cold run time: 119874 ms
Total hot run time: 40628 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4656	4487	4452	4452
q2	378	274	279	274
q3	3054	2846	2914	2846
q4	1998	1679	1704	1679
q5	5497	5517	5509	5509
q6	230	133	130	130
q7	2126	1801	1788	1788
q8	3366	3419	3419	3419
q9	8741	8724	8774	8724
q10	4091	3886	3870	3870
q11	605	499	509	499
q12	817	659	662	659
q13	17019	2996	3153	2996
q14	330	266	270	266
q15	529	476	476	476
q16	503	436	454	436
q17	1822	1528	1502	1502
q18	8079	7793	7619	7619
q19	1782	1662	1650	1650
q20	3061	1879	1856	1856
q21	5116	4844	4951	4844
q22	635	554	598	554
Total cold run time: 74435 ms
Total hot run time: 56048 ms

@doris-robot
Copy link

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

query1	807	385	380	380
query2	6302	2510	2334	2334
query3	6399	206	204	204
query4	19196	17294	17211	17211
query5	3732	495	472	472
query6	243	162	162	162
query7	4475	320	304	304
query8	312	277	284	277
query9	8351	2401	2420	2401
query10	574	320	284	284
query11	10438	10025	10009	10009
query12	137	89	83	83
query13	1588	372	361	361
query14	10048	7205	7616	7205
query15	225	189	183	183
query16	7794	264	264	264
query17	1392	565	519	519
query18	1947	278	282	278
query19	207	159	167	159
query20	97	91	88	88
query21	206	133	127	127
query22	4286	4132	4004	4004
query23	33701	33566	33644	33566
query24	11120	2812	2905	2812
query25	619	374	370	370
query26	1088	151	153	151
query27	2287	321	323	321
query28	6611	2048	2053	2048
query29	880	625	594	594
query30	231	148	152	148
query31	974	730	748	730
query32	89	53	56	53
query33	759	286	280	280
query34	926	500	484	484
query35	725	654	624	624
query36	1123	890	952	890
query37	138	71	73	71
query38	2839	2747	2742	2742
query39	846	802	815	802
query40	209	134	125	125
query41	54	51	55	51
query42	122	100	101	100
query43	571	506	541	506
query44	1216	739	726	726
query45	191	170	164	164
query46	1061	722	712	712
query47	1893	1765	1801	1765
query48	368	304	296	296
query49	858	418	412	412
query50	772	425	384	384
query51	6813	6693	6643	6643
query52	105	89	91	89
query53	352	292	296	292
query54	888	457	437	437
query55	76	72	75	72
query56	281	257	258	257
query57	1144	1029	1042	1029
query58	244	251	251	251
query59	3264	3060	3026	3026
query60	319	285	276	276
query61	94	92	88	88
query62	624	447	470	447
query63	319	302	308	302
query64	8928	2295	1761	1761
query65	3178	3074	3088	3074
query66	784	328	324	324
query67	15538	15152	15183	15152
query68	4509	536	546	536
query69	580	518	409	409
query70	1182	1179	1146	1146
query71	380	289	292	289
query72	6962	5356	2750	2750
query73	743	327	322	322
query74	5884	5487	5562	5487
query75	3365	2663	2658	2658
query76	2320	958	877	877
query77	443	302	300	300
query78	10252	10013	9778	9778
query79	2042	522	525	522
query80	1176	473	467	467
query81	604	222	223	222
query82	706	104	108	104
query83	241	165	170	165
query84	249	89	90	89
query85	1870	282	280	280
query86	491	322	318	318
query87	3257	3042	3109	3042
query88	3891	2366	2349	2349
query89	474	386	401	386
query90	1855	194	195	194
query91	139	101	104	101
query92	62	50	51	50
query93	2078	511	499	499
query94	1275	199	207	199
query95	414	397	311	311
query96	586	270	261	261
query97	3290	3080	3026	3026
query98	230	203	201	201
query99	1165	842	849	842
Total cold run time: 266693 ms
Total hot run time: 170936 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.3 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit b9bac056e7b30cb7ceae16ae90587a5a603d2cc6, 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.67	0.07	0.10
query5	0.50	0.47	0.50
query6	1.12	0.72	0.72
query7	0.03	0.01	0.01
query8	0.06	0.04	0.05
query9	0.53	0.49	0.48
query10	0.55	0.55	0.55
query11	0.16	0.11	0.11
query12	0.14	0.12	0.12
query13	0.60	0.58	0.61
query14	0.77	0.77	0.77
query15	0.85	0.82	0.80
query16	0.36	0.37	0.36
query17	1.01	0.98	0.93
query18	0.21	0.25	0.26
query19	1.90	1.72	1.71
query20	0.02	0.01	0.01
query21	15.41	0.64	0.65
query22	4.50	7.47	1.76
query23	18.30	1.32	1.20
query24	2.08	0.22	0.22
query25	0.16	0.08	0.08
query26	0.27	0.18	0.17
query27	0.08	0.07	0.08
query28	13.28	1.02	1.00
query29	12.65	3.34	3.27
query30	0.26	0.07	0.06
query31	2.85	0.38	0.37
query32	3.30	0.47	0.47
query33	2.90	2.98	2.93
query34	17.30	4.44	4.39
query35	4.50	4.52	4.56
query36	0.66	0.45	0.46
query37	0.19	0.15	0.16
query38	0.16	0.15	0.14
query39	0.04	0.04	0.03
query40	0.17	0.15	0.14
query41	0.09	0.05	0.05
query42	0.05	0.06	0.05
query43	0.04	0.04	0.04
Total cold run time: 110.07 s
Total hot run time: 30.3 s

@Yukang-Lian Yukang-Lian force-pushed the Fix-Partial-Update-Delete-Predicate-Delete-Sign branch 2 times, most recently from d2405ba to ab893b2 Compare June 19, 2024 09:50
@Yukang-Lian
Copy link
Collaborator Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17623	4371	4240	4240
q2	2038	195	194	194
q3	10467	1168	1084	1084
q4	10186	769	777	769
q5	7847	2741	2622	2622
q6	223	142	143	142
q7	973	636	612	612
q8	9287	2072	2060	2060
q9	8926	6484	6465	6465
q10	8825	3765	3730	3730
q11	443	238	235	235
q12	396	224	228	224
q13	17757	2949	3050	2949
q14	250	218	226	218
q15	512	479	492	479
q16	527	389	375	375
q17	955	637	690	637
q18	8116	7549	7294	7294
q19	7265	1562	1501	1501
q20	664	311	325	311
q21	4879	3211	3177	3177
q22	396	339	341	339
Total cold run time: 118555 ms
Total hot run time: 39657 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4366	4275	4299	4275
q2	364	265	274	265
q3	2953	2725	2719	2719
q4	1865	1638	1647	1638
q5	5260	5319	5274	5274
q6	220	131	131	131
q7	2082	1748	1695	1695
q8	3180	3341	3315	3315
q9	8245	8319	8305	8305
q10	3837	3663	3632	3632
q11	575	497	486	486
q12	789	593	625	593
q13	17464	3011	2974	2974
q14	301	265	256	256
q15	515	485	474	474
q16	463	422	432	422
q17	1761	1467	1488	1467
q18	7527	7537	7354	7354
q19	2418	1630	1528	1528
q20	1993	1782	1792	1782
q21	4788	4740	4862	4740
q22	622	565	572	565
Total cold run time: 71588 ms
Total hot run time: 53890 ms

@doris-robot
Copy link

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

query1	922	392	363	363
query2	6471	2400	2216	2216
query3	6648	205	212	205
query4	19373	17293	17178	17178
query5	4141	472	460	460
query6	258	165	159	159
query7	4593	303	282	282
query8	319	305	303	303
query9	8523	2393	2376	2376
query10	626	305	286	286
query11	10500	10195	10133	10133
query12	130	92	82	82
query13	1639	371	363	363
query14	8615	7670	6883	6883
query15	229	191	191	191
query16	7740	270	273	270
query17	1910	535	529	529
query18	1712	268	266	266
query19	192	151	148	148
query20	99	85	87	85
query21	205	123	128	123
query22	4447	4082	4032	4032
query23	33647	32986	33100	32986
query24	11819	2803	2818	2803
query25	656	352	359	352
query26	1778	161	152	152
query27	2945	313	331	313
query28	7575	2042	2018	2018
query29	1079	640	608	608
query30	277	151	148	148
query31	938	721	774	721
query32	89	55	59	55
query33	784	282	276	276
query34	982	474	457	457
query35	740	598	609	598
query36	1085	924	941	924
query37	280	68	72	68
query38	2883	2751	2815	2751
query39	850	808	771	771
query40	283	126	122	122
query41	57	52	55	52
query42	116	101	103	101
query43	577	552	530	530
query44	1218	712	713	712
query45	197	167	161	161
query46	1078	700	727	700
query47	1844	1775	1786	1775
query48	357	295	297	295
query49	1189	405	406	405
query50	762	395	392	392
query51	6803	6725	6702	6702
query52	100	94	92	92
query53	387	285	286	285
query54	1038	434	438	434
query55	79	78	73	73
query56	279	262	267	262
query57	1145	1080	1035	1035
query58	251	234	231	231
query59	3381	3216	3161	3161
query60	312	274	268	268
query61	90	116	92	92
query62	658	439	440	439
query63	313	284	293	284
query64	9843	2246	1712	1712
query65	3209	3245	3121	3121
query66	1339	351	393	351
query67	15441	14978	15193	14978
query68	4565	530	531	530
query69	460	295	308	295
query70	1183	1155	1139	1139
query71	397	271	265	265
query72	7147	5714	5611	5611
query73	735	326	319	319
query74	5900	5575	5444	5444
query75	3492	2694	2601	2601
query76	2835	1018	904	904
query77	441	299	287	287
query78	10329	9943	9753	9753
query79	2413	507	502	502
query80	977	449	463	449
query81	579	223	225	223
query82	752	103	100	100
query83	231	166	166	166
query84	239	84	88	84
query85	2041	333	360	333
query86	494	308	323	308
query87	3240	3092	3072	3072
query88	4090	2352	2333	2333
query89	472	373	386	373
query90	1820	184	192	184
query91	128	99	100	99
query92	64	50	50	50
query93	2440	518	498	498
query94	1261	183	181	181
query95	405	306	324	306
query96	589	265	265	265
query97	3256	3077	2996	2996
query98	220	197	194	194
query99	1264	833	861	833
Total cold run time: 274504 ms
Total hot run time: 172396 ms

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@zhannngchen zhannngchen merged commit 91439bf into apache:master Jun 26, 2024
@weilai201
Copy link

那个版本发布后,修复此问题呢?

@zhannngchen
Copy link
Contributor

@weilai201 2.1.5

dataroaring pushed a commit that referenced this pull request Jun 28, 2024
…table (#35917)

## Proposed changes

close #34551 

Problem: As shown in the issue above, if a key deleted by a delete
statement is written to by updating only certain columns, the data will
not display correctly.

Reason: The delete statement deletes the data by writing a delete
predicate, which is stored in the rowset meta and applied during data
retrieval to filter the data. However, partial column updates do not
consider the effect of the delete predicate when reading the original
data. The imported key should be considered as a new key (since it has
already been deleted), but it is actually treated as an old key.
Therefore, only some columns are updated, leading to incorrect results.

Solution: Consider the delete predicate during partial column updates,
but this method will result in reading more columns, as shown in #35766.
Thus, in this PR, we change the delete operation in the mow table from
writing a delete predicate to writing a delete sign, which effectively
resolves the issue.
gavinchou pushed a commit that referenced this pull request Jul 5, 2024
…d mode (#37151)

Problem: The `test_new_partial_update` case fails to run in cloud mode,
but it passes in local mode.

Reason: In PR #35917, we introduced a new table attribute
`enable_light_delete`. When executing schema changes with `alter table
set xxx` statements, the local and cloud modes process the logic
differently. The cloud mode has its unique processing logic, which was
not addressed in the mentioned PR, leading to failures in the cloud
environment.

Solution: To resolve the issue, we need to complete the missing schema
change logic for the cloud mode. Once this is implemented, the problem
should be resolved.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Jul 10, 2024
…table (apache#35917)

close apache#34551

Problem: As shown in the issue above, if a key deleted by a delete
statement is written to by updating only certain columns, the data will
not display correctly.

Reason: The delete statement deletes the data by writing a delete
predicate, which is stored in the rowset meta and applied during data
retrieval to filter the data. However, partial column updates do not
consider the effect of the delete predicate when reading the original
data. The imported key should be considered as a new key (since it has
already been deleted), but it is actually treated as an old key.
Therefore, only some columns are updated, leading to incorrect results.

Solution: Consider the delete predicate during partial column updates,
but this method will result in reading more columns, as shown in apache#35766.
Thus, in this PR, we change the delete operation in the mow table from
writing a delete predicate to writing a delete sign, which effectively
resolves the issue.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Jul 10, 2024
…d mode (apache#37151)

Problem: The `test_new_partial_update` case fails to run in cloud mode,
but it passes in local mode.

Reason: In PR apache#35917, we introduced a new table attribute
`enable_light_delete`. When executing schema changes with `alter table
set xxx` statements, the local and cloud modes process the logic
differently. The cloud mode has its unique processing logic, which was
not addressed in the mentioned PR, leading to failures in the cloud
environment.

Solution: To resolve the issue, we need to complete the missing schema
change logic for the cloud mode. Once this is implemented, the problem
should be resolved.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Jul 15, 2024
…table (apache#35917)

close apache#34551

Problem: As shown in the issue above, if a key deleted by a delete
statement is written to by updating only certain columns, the data will
not display correctly.

Reason: The delete statement deletes the data by writing a delete
predicate, which is stored in the rowset meta and applied during data
retrieval to filter the data. However, partial column updates do not
consider the effect of the delete predicate when reading the original
data. The imported key should be considered as a new key (since it has
already been deleted), but it is actually treated as an old key.
Therefore, only some columns are updated, leading to incorrect results.

Solution: Consider the delete predicate during partial column updates,
but this method will result in reading more columns, as shown in apache#35766.
Thus, in this PR, we change the delete operation in the mow table from
writing a delete predicate to writing a delete sign, which effectively
resolves the issue.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Jul 15, 2024
…d mode (apache#37151)

Problem: The `test_new_partial_update` case fails to run in cloud mode,
but it passes in local mode.

Reason: In PR apache#35917, we introduced a new table attribute
`enable_light_delete`. When executing schema changes with `alter table
set xxx` statements, the local and cloud modes process the logic
differently. The cloud mode has its unique processing logic, which was
not addressed in the mentioned PR, leading to failures in the cloud
environment.

Solution: To resolve the issue, we need to complete the missing schema
change logic for the cloud mode. Once this is implemented, the problem
should be resolved.
zhannngchen pushed a commit that referenced this pull request Jul 15, 2024
dataroaring pushed a commit that referenced this pull request Jul 17, 2024
…d mode (#37151)

Problem: The `test_new_partial_update` case fails to run in cloud mode,
but it passes in local mode.

Reason: In PR #35917, we introduced a new table attribute
`enable_light_delete`. When executing schema changes with `alter table
set xxx` statements, the local and cloud modes process the logic
differently. The cloud mode has its unique processing logic, which was
not addressed in the mentioned PR, leading to failures in the cloud
environment.

Solution: To resolve the issue, we need to complete the missing schema
change logic for the cloud mode. Once this is implemented, the problem
should be resolved.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Jul 29, 2024
…table (apache#35917)

close apache#34551

Problem: As shown in the issue above, if a key deleted by a delete
statement is written to by updating only certain columns, the data will
not display correctly.

Reason: The delete statement deletes the data by writing a delete
predicate, which is stored in the rowset meta and applied during data
retrieval to filter the data. However, partial column updates do not
consider the effect of the delete predicate when reading the original
data. The imported key should be considered as a new key (since it has
already been deleted), but it is actually treated as an old key.
Therefore, only some columns are updated, leading to incorrect results.

Solution: Consider the delete predicate during partial column updates,
but this method will result in reading more columns, as shown in apache#35766.
Thus, in this PR, we change the delete operation in the mow table from
writing a delete predicate to writing a delete sign, which effectively
resolves the issue.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Jul 29, 2024
…d mode (apache#37151)

Problem: The `test_new_partial_update` case fails to run in cloud mode,
but it passes in local mode.

Reason: In PR apache#35917, we introduced a new table attribute
`enable_light_delete`. When executing schema changes with `alter table
set xxx` statements, the local and cloud modes process the logic
differently. The cloud mode has its unique processing logic, which was
not addressed in the mentioned PR, leading to failures in the cloud
environment.

Solution: To resolve the issue, we need to complete the missing schema
change logic for the cloud mode. Once this is implemented, the problem
should be resolved.
gavinchou pushed a commit that referenced this pull request Sep 13, 2024
In #35917 and #37151, we changed MOW table default delete command from
delete predicate to delete sign. It makes sure the correctness during
partial update but leads to slowdowns. Actually, if there is no partial
update, delete predicate will not lead to data fault. Delete data by
delete predicate or delete sign can be controlled by a table property
"enable_light_delete". If "enable_light_delete=true", we execute delete
command by delete predicate. Otherwise, we execute delete command by
delete sign.

In p2 cases, there are lots of cases with large data need to delete and
do not perform partial column update operations. Therefore, in order to
make it faster, we change some cases default create table clause.
dataroaring pushed a commit that referenced this pull request Oct 9, 2024
In #35917 and #37151, we changed MOW table default delete command from
delete predicate to delete sign. It makes sure the correctness during
partial update but leads to slowdowns. Actually, if there is no partial
update, delete predicate will not lead to data fault. Delete data by
delete predicate or delete sign can be controlled by a table property
"enable_light_delete". If "enable_light_delete=true", we execute delete
command by delete predicate. Otherwise, we execute delete command by
delete sign.

In p2 cases, there are lots of cases with large data need to delete and
do not perform partial column update operations. Therefore, in order to
make it faster, we change some cases default create table clause.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Oct 12, 2024
…7689)

In apache#35917 and apache#37151, we changed MOW table default delete command from
delete predicate to delete sign. It makes sure the correctness during
partial update but leads to slowdowns. Actually, if there is no partial
update, delete predicate will not lead to data fault. Delete data by
delete predicate or delete sign can be controlled by a table property
"enable_light_delete". If "enable_light_delete=true", we execute delete
command by delete predicate. Otherwise, we execute delete command by
delete sign.

In p2 cases, there are lots of cases with large data need to delete and
do not perform partial column update operations. Therefore, in order to
make it faster, we change some cases default create table clause.
Yukang-Lian added a commit to Yukang-Lian/doris that referenced this pull request Oct 12, 2024
…7689)

In apache#35917 and apache#37151, we changed MOW table default delete command from
delete predicate to delete sign. It makes sure the correctness during
partial update but leads to slowdowns. Actually, if there is no partial
update, delete predicate will not lead to data fault. Delete data by
delete predicate or delete sign can be controlled by a table property
"enable_light_delete". If "enable_light_delete=true", we execute delete
command by delete predicate. Otherwise, we execute delete command by
delete sign.

In p2 cases, there are lots of cases with large data need to delete and
do not perform partial column update operations. Therefore, in order to
make it faster, we change some cases default create table clause.
mongo360 pushed a commit to mongo360/doris that referenced this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 使用delete 删除的数据仍然可以查询到

8 participants