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

[improve](txn insert) Txn load support cloud mode #34721

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

mymeiyi
Copy link
Contributor

@mymeiyi mymeiyi commented May 11, 2024

Proposed changes

Purpose

The user doc: https://doris.apache.org/zh-CN/docs/dev/data-operate/import/transaction-load-manual

We have supported insert into select(#31666), update(#33034) and delete(#33100) in transaction load.

#32980 implements one txn write to one partition more than one rowsets.

This pr implements to cloud mode of #32980

Implementation

sub_txn_id

see #32980

Meta service supports commit txn

This process is generally the same as commit_txn, the difference is that he partitions version will plus 1 in multi sub txns.

One example:
Suppose the table, partition, tablet and version info is:

--------------------------------------------
| table | partition | tablet    | version |
--------------------------------------------
| t1    | t1_p1     | t1_p1.1   | 1       |
| t1    | t1_p1     | t1_p1.2   | 1       |
| t1    | t1_p2     | t1_p2.1   | 2       |
| t2    | t2_p3     | t2_p3.1   | 3       |
| t2    | t2_p4     | t2_p4.1   | 4       |
--------------------------------------------

Now we commit a txn with 3 sub txns and the tablets are:

  • sub_txn1: t1_p1.1, t1_p1.2, t1_p2.1
  • sub_txn2: t2_p3.1
  • sub_txn3: t1_p1.1, t1_p1.2

When commit, the partitions version will be:

  • sub_txn1: t1_p1(1 -> 2), t1_p2(2 -> 3)
  • sub_txn2: t2_p3(3 -> 4)
  • sub_txn3: t1_p1(2 -> 3)

After commit, the partitions version will be:

  • t1: t1_p1(3), t1_p2(3)
  • t2: t2_p3(4), t2_p4(4)

Meta service support generate sub_txn_id by begin_sub_txn

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.

@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 11, 2024

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17654	5138	4265	4265
q2	2022	216	190	190
q3	10541	1218	1169	1169
q4	10159	786	878	786
q5	7484	2797	2672	2672
q6	219	129	130	129
q7	1017	562	569	562
q8	9224	2126	2112	2112
q9	9017	6578	6525	6525
q10	8974	3702	3727	3702
q11	478	246	232	232
q12	405	217	208	208
q13	17763	2922	2942	2922
q14	261	217	223	217
q15	514	479	472	472
q16	504	393	387	387
q17	984	694	758	694
q18	8100	7511	7345	7345
q19	6004	1551	1533	1533
q20	660	322	310	310
q21	5128	3837	4055	3837
q22	369	287	286	286
Total cold run time: 117481 ms
Total hot run time: 40555 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4357	4292	4210	4210
q2	377	269	277	269
q3	2982	2784	2730	2730
q4	1874	1657	1623	1623
q5	5325	5310	5317	5310
q6	209	122	122	122
q7	2249	1854	1886	1854
q8	3219	3372	3400	3372
q9	8337	8405	8388	8388
q10	3872	3707	3685	3685
q11	588	492	484	484
q12	780	587	577	577
q13	16483	3010	2982	2982
q14	291	261	263	261
q15	541	484	482	482
q16	470	408	409	408
q17	1781	1477	1515	1477
q18	7731	7516	7490	7490
q19	1745	1611	1584	1584
q20	1968	1766	1737	1737
q21	8049	4938	4991	4938
q22	579	516	495	495
Total cold run time: 73807 ms
Total hot run time: 54478 ms

@doris-robot
Copy link

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

query1	928	367	341	341
query2	6456	2414	2326	2326
query3	6652	212	208	208
query4	23170	21248	21321	21248
query5	4201	413	420	413
query6	258	174	177	174
query7	4580	286	285	285
query8	239	186	185	185
query9	8719	2442	2407	2407
query10	447	257	243	243
query11	14703	14129	14258	14129
query12	136	88	82	82
query13	1633	367	364	364
query14	10052	6821	7692	6821
query15	242	169	170	169
query16	8003	266	262	262
query17	1853	551	538	538
query18	2023	273	270	270
query19	197	151	146	146
query20	91	84	85	84
query21	193	122	121	121
query22	5085	4839	4832	4832
query23	34256	33757	33231	33231
query24	12040	2826	2835	2826
query25	696	353	362	353
query26	1800	154	152	152
query27	3109	324	319	319
query28	7585	2050	2043	2043
query29	1069	619	592	592
query30	291	151	152	151
query31	967	747	755	747
query32	89	53	53	53
query33	753	265	241	241
query34	1062	489	484	484
query35	844	687	669	669
query36	1044	930	926	926
query37	265	65	67	65
query38	2886	2788	2774	2774
query39	1612	1584	1553	1553
query40	275	128	121	121
query41	40	38	38	38
query42	103	94	96	94
query43	609	541	542	541
query44	1212	711	726	711
query45	263	247	252	247
query46	1100	701	717	701
query47	1969	1849	1879	1849
query48	379	298	288	288
query49	1196	382	382	382
query50	775	386	389	386
query51	6901	6781	6842	6781
query52	105	90	90	90
query53	363	273	282	273
query54	921	431	424	424
query55	79	75	74	74
query56	236	212	213	212
query57	1240	1160	1175	1160
query58	216	190	196	190
query59	3604	3152	3236	3152
query60	259	223	235	223
query61	119	84	87	84
query62	671	464	459	459
query63	301	275	280	275
query64	9718	7379	7382	7379
query65	3146	3104	3092	3092
query66	1392	353	348	348
query67	15437	15079	15180	15079
query68	4513	530	534	530
query69	473	299	301	299
query70	1155	1105	1146	1105
query71	394	269	263	263
query72	7319	2576	2326	2326
query73	711	327	323	323
query74	6587	6208	6085	6085
query75	3503	2661	2638	2638
query76	2753	1006	987	987
query77	401	260	259	259
query78	10633	10153	10255	10153
query79	1391	507	501	501
query80	970	446	430	430
query81	499	223	221	221
query82	1286	96	87	87
query83	238	166	161	161
query84	241	86	83	83
query85	1197	266	263	263
query86	374	301	325	301
query87	3265	3086	3074	3074
query88	3088	2392	2375	2375
query89	477	368	384	368
query90	1902	178	188	178
query91	122	98	95	95
query92	54	53	47	47
query93	1004	515	500	500
query94	1237	182	177	177
query95	392	302	295	295
query96	570	268	263	263
query97	3191	2967	2984	2967
query98	232	215	213	213
query99	1133	904	907	904
Total cold run time: 284163 ms
Total hot run time: 185951 ms

@mymeiyi mymeiyi force-pushed the txn-insert-cloud-2 branch 2 times, most recently from 8078ba3 to 296f6a1 Compare May 13, 2024 08:11
Copy link
Contributor

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

@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 13, 2024

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	7757	4334	4293	4293
q2	528	198	204	198
q3	1372	1125	1146	1125
q4	1018	761	730	730
q5	2640	2677	2666	2666
q6	220	133	136	133
q7	1015	599	559	559
q8	1997	2367	2166	2166
q9	7064	6836	6775	6775
q10	4045	3909	4031	3909
q11	384	237	241	237
q12	403	219	227	219
q13	16538	3034	3108	3034
q14	282	226	220	220
q15	538	470	460	460
q16	481	411	398	398
q17	947	744	712	712
q18	8473	7877	7889	7877
q19	1615	1579	1520	1520
q20	777	321	335	321
q21	7814	3327	4211	3327
q22	374	288	287	287
Total cold run time: 66282 ms
Total hot run time: 41166 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4419	4374	4344	4344
q2	382	282	268	268
q3	3125	2877	2790	2790
q4	1921	1584	1609	1584
q5	5309	5321	5307	5307
q6	208	124	125	124
q7	2260	1872	1869	1869
q8	3181	3369	3339	3339
q9	8346	8408	8410	8408
q10	3850	3698	3725	3698
q11	582	481	482	481
q12	802	575	608	575
q13	3532	2983	2990	2983
q14	290	262	259	259
q15	517	473	467	467
q16	472	418	416	416
q17	1737	1461	1487	1461
q18	7736	7472	7516	7472
q19	1736	1603	1507	1507
q20	1959	1774	1754	1754
q21	5045	4850	5009	4850
q22	566	504	501	501
Total cold run time: 57975 ms
Total hot run time: 54457 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 188753 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 296f6a1c089ff50a42286545b8cce34f7b717159, data reload: false

query1	914	369	362	362
query2	6410	2374	2332	2332
query3	6644	205	207	205
query4	22886	21278	21198	21198
query5	4113	419	423	419
query6	268	174	172	172
query7	4590	305	289	289
query8	240	183	184	183
query9	8520	2471	2424	2424
query10	454	255	285	255
query11	14742	14159	14156	14156
query12	136	90	93	90
query13	1640	388	394	388
query14	9252	8573	8583	8573
query15	284	172	167	167
query16	7953	257	263	257
query17	1719	568	542	542
query18	2039	291	265	265
query19	195	146	151	146
query20	91	83	86	83
query21	201	128	130	128
query22	5089	4832	4896	4832
query23	34129	33528	33742	33528
query24	6322	2885	2877	2877
query25	532	359	363	359
query26	692	150	149	149
query27	1931	315	321	315
query28	3586	2065	2057	2057
query29	833	598	608	598
query30	240	153	156	153
query31	955	746	745	745
query32	95	52	53	52
query33	481	255	245	245
query34	886	493	485	485
query35	755	675	669	669
query36	1076	941	972	941
query37	110	66	70	66
query38	2835	2754	2761	2754
query39	1643	1569	1569	1569
query40	195	129	123	123
query41	43	38	39	38
query42	104	95	97	95
query43	572	535	554	535
query44	1089	724	740	724
query45	267	252	223	223
query46	1074	746	710	710
query47	1953	1870	1904	1870
query48	385	299	300	299
query49	768	411	396	396
query50	776	386	407	386
query51	6783	6669	6684	6669
query52	104	88	87	87
query53	357	286	296	286
query54	533	466	428	428
query55	73	70	72	70
query56	238	221	221	221
query57	1251	1169	1147	1147
query58	223	201	201	201
query59	3569	3218	3253	3218
query60	257	236	232	232
query61	88	86	87	86
query62	576	476	484	476
query63	306	277	284	277
query64	8454	7514	7478	7478
query65	3109	3105	3101	3101
query66	814	350	347	347
query67	15500	15062	15367	15062
query68	4555	535	537	535
query69	483	310	308	308
query70	1147	1143	1144	1143
query71	383	278	275	275
query72	8099	2684	2522	2522
query73	704	330	326	326
query74	6435	6176	6058	6058
query75	3280	2702	2584	2584
query76	2316	1068	1008	1008
query77	453	267	267	267
query78	10704	10354	10162	10162
query79	4167	511	510	510
query80	986	444	443	443
query81	468	219	221	219
query82	749	99	98	98
query83	204	168	167	167
query84	269	92	85	85
query85	970	268	281	268
query86	412	299	302	299
query87	3252	3109	3135	3109
query88	4349	2473	2476	2473
query89	496	393	402	393
query90	2202	195	194	194
query91	122	96	96	96
query92	64	47	47	47
query93	5118	504	504	504
query94	1061	184	188	184
query95	404	307	308	307
query96	610	281	273	273
query97	3151	2973	3011	2973
query98	240	225	218	218
query99	1210	899	892	892
Total cold run time: 274005 ms
Total hot run time: 188753 ms

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

cloud/test/meta_service_test.cpp Show resolved Hide resolved
cloud/test/meta_service_test.cpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -1332,6 +1332,313 @@ TEST(MetaServiceTest, CommitTxnExpiredTest) {
}
}

TEST(MetaServiceTest, CommitTxnWithSubTxnTest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(MetaServiceTest, CommitTxnWithSubTxnTest) {
^
Additional context

cloud/test/meta_service_test.cpp:1334: 185 lines including whitespace and comments (threshold 80)

TEST(MetaServiceTest, CommitTxnWithSubTxnTest) {
^

}
}

TEST(MetaServiceTest, BeginAndAbortSubTxnTest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(MetaServiceTest, BeginAndAbortSubTxnTest) {
^
Additional context

cloud/test/meta_service_test.cpp:1521: 118 lines including whitespace and comments (threshold 80)

TEST(MetaServiceTest, BeginAndAbortSubTxnTest) {
^

@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 15, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17614	4270	4228	4228
q2	2020	191	198	191
q3	10438	1242	1259	1242
q4	10199	804	823	804
q5	7477	2741	2650	2650
q6	226	132	132	132
q7	1020	618	585	585
q8	9214	2185	2112	2112
q9	9282	6742	6688	6688
q10	9718	3951	3847	3847
q11	463	240	240	240
q12	445	220	232	220
q13	17204	3120	3269	3120
q14	257	226	228	226
q15	532	462	479	462
q16	477	374	366	366
q17	983	652	688	652
q18	8473	8159	7816	7816
q19	7204	1550	1571	1550
q20	637	322	318	318
q21	5121	4113	4295	4113
q22	371	281	279	279
Total cold run time: 119375 ms
Total hot run time: 41841 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4501	4408	4391	4391
q2	385	288	277	277
q3	3131	2955	2797	2797
q4	1913	1595	1657	1595
q5	5483	5459	5500	5459
q6	221	127	129	127
q7	2354	1965	1973	1965
q8	3278	3394	3421	3394
q9	8686	8707	8611	8611
q10	3983	3852	3834	3834
q11	581	487	502	487
q12	800	579	607	579
q13	16764	3148	3222	3148
q14	311	264	264	264
q15	511	483	459	459
q16	477	423	406	406
q17	1771	1489	1478	1478
q18	7718	7704	7429	7429
q19	1680	1551	1531	1531
q20	1970	1785	1763	1763
q21	4917	4798	4917	4798
q22	605	495	502	495
Total cold run time: 72040 ms
Total hot run time: 55287 ms

@doris-robot
Copy link

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

query1	917	393	376	376
query2	6458	2491	2324	2324
query3	6627	211	209	209
query4	22790	21239	21234	21234
query5	4127	423	448	423
query6	265	193	170	170
query7	4583	311	292	292
query8	239	185	195	185
query9	8464	2437	2400	2400
query10	435	258	264	258
query11	14764	14271	14156	14156
query12	136	93	90	90
query13	1654	377	381	377
query14	10548	7365	8387	7365
query15	256	163	171	163
query16	8100	259	266	259
query17	1733	567	544	544
query18	2110	282	269	269
query19	203	153	149	149
query20	93	89	84	84
query21	199	131	130	130
query22	5035	4862	4918	4862
query23	34074	33518	33740	33518
query24	6916	2928	2908	2908
query25	561	373	373	373
query26	691	159	153	153
query27	2176	321	331	321
query28	4979	2091	2054	2054
query29	832	613	605	605
query30	275	176	182	176
query31	995	779	751	751
query32	90	51	52	51
query33	514	248	257	248
query34	870	485	478	478
query35	766	688	677	677
query36	1068	891	898	891
query37	113	68	69	68
query38	2874	2759	2787	2759
query39	1606	1548	1611	1548
query40	198	128	122	122
query41	50	44	43	43
query42	100	94	96	94
query43	560	545	530	530
query44	1092	726	740	726
query45	267	256	233	233
query46	1070	710	729	710
query47	1970	1898	1920	1898
query48	375	295	292	292
query49	863	398	402	398
query50	786	392	414	392
query51	6938	6868	6730	6730
query52	108	93	92	92
query53	351	286	292	286
query54	541	440	433	433
query55	75	75	75	75
query56	255	231	233	231
query57	1217	1148	1189	1148
query58	228	210	208	208
query59	3289	3102	3091	3091
query60	293	253	251	251
query61	111	108	105	105
query62	625	489	479	479
query63	310	297	299	297
query64	8541	7475	7511	7475
query65	3140	3080	3106	3080
query66	791	373	354	354
query67	15456	15194	15114	15114
query68	6534	559	554	554
query69	546	312	324	312
query70	1215	1143	1072	1072
query71	458	275	280	275
query72	7869	2693	2493	2493
query73	719	340	333	333
query74	6525	6168	6059	6059
query75	3853	2680	2580	2580
query76	3853	1070	957	957
query77	735	274	276	274
query78	10746	10065	10116	10065
query79	6073	522	517	517
query80	1107	471	454	454
query81	515	386	242	242
query82	894	99	96	96
query83	201	165	167	165
query84	271	82	89	82
query85	1222	269	272	269
query86	446	327	323	323
query87	3295	3101	3077	3077
query88	4980	2437	2434	2434
query89	498	388	396	388
query90	2014	188	193	188
query91	127	104	101	101
query92	61	50	49	49
query93	5624	529	505	505
query94	1191	183	182	182
query95	410	306	309	306
query96	609	269	272	269
query97	3128	3011	2967	2967
query98	233	223	209	209
query99	1213	907	902	902
Total cold run time: 285901 ms
Total hot run time: 187484 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.03
query2	0.08	0.04	0.03
query3	0.23	0.05	0.06
query4	1.66	0.07	0.09
query5	0.50	0.48	0.50
query6	1.13	0.73	0.73
query7	0.02	0.01	0.02
query8	0.05	0.04	0.05
query9	0.53	0.50	0.47
query10	0.54	0.55	0.53
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.60	0.59	0.61
query14	0.78	0.77	0.77
query15	0.83	0.81	0.80
query16	0.36	0.36	0.36
query17	1.02	1.01	0.95
query18	0.20	0.25	0.25
query19	1.82	1.72	1.66
query20	0.02	0.01	0.01
query21	15.44	0.75	0.69
query22	4.70	6.67	2.29
query23	18.28	1.33	1.26
query24	1.57	0.32	0.23
query25	0.16	0.08	0.08
query26	0.26	0.16	0.16
query27	0.08	0.08	0.08
query28	13.34	1.01	1.00
query29	13.22	3.31	3.26
query30	0.24	0.06	0.05
query31	2.85	0.38	0.39
query32	3.29	0.47	0.46
query33	2.80	2.86	2.79
query34	17.12	4.42	4.46
query35	4.47	4.51	4.66
query36	0.64	0.45	0.47
query37	0.17	0.15	0.15
query38	0.15	0.15	0.15
query39	0.04	0.04	0.03
query40	0.17	0.13	0.15
query41	0.09	0.05	0.04
query42	0.06	0.04	0.05
query43	0.04	0.04	0.03
Total cold run time: 109.91 s
Total hot run time: 30.74 s

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

}
}

TEST(MetaServiceTest, BeginAndAbortSubTxnTest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'TEST' exceeds recommended size/complexity thresholds [readability-function-size]

TEST(MetaServiceTest, BeginAndAbortSubTxnTest) {
^
Additional context

cloud/test/meta_service_test.cpp:1521: 119 lines including whitespace and comments (threshold 80)

TEST(MetaServiceTest, BeginAndAbortSubTxnTest) {
^

@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 15, 2024

run buildall

@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 20, 2024

run buildall

@mymeiyi mymeiyi force-pushed the txn-insert-cloud-2 branch 2 times, most recently from 94bc14a to 16a2691 Compare May 22, 2024 02:55
@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 22, 2024

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 182574 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 16a2691ebf2cf85daa731860eff5651d5a6e11e4, data reload: false

query1	909	387	371	371
query2	6259	2406	2314	2314
query3	6648	207	210	207
query4	24678	21772	21881	21772
query5	3938	441	427	427
query6	266	177	173	173
query7	4668	308	305	305
query8	241	187	183	183
query9	8650	2465	2493	2465
query10	426	281	248	248
query11	15348	14797	14948	14797
query12	123	85	98	85
query13	1595	379	388	379
query14	10976	8374	6869	6869
query15	245	165	171	165
query16	7596	260	248	248
query17	1766	547	535	535
query18	1957	273	265	265
query19	319	146	151	146
query20	85	90	81	81
query21	190	132	126	126
query22	5106	4914	4805	4805
query23	34050	33642	33568	33568
query24	10720	2912	2892	2892
query25	603	356	364	356
query26	1133	154	155	154
query27	2349	315	310	310
query28	7250	2034	2041	2034
query29	859	610	619	610
query30	270	171	173	171
query31	923	736	742	736
query32	92	49	50	49
query33	754	242	244	242
query34	1038	489	477	477
query35	855	668	649	649
query36	1069	915	928	915
query37	126	73	91	73
query38	2919	2780	2770	2770
query39	1599	1550	1691	1550
query40	196	123	123	123
query41	46	44	44	44
query42	100	93	95	93
query43	566	530	518	518
query44	1223	737	742	737
query45	270	255	247	247
query46	1081	723	719	719
query47	1965	1887	1893	1887
query48	376	299	297	297
query49	886	401	396	396
query50	763	380	387	380
query51	6818	6868	6779	6779
query52	102	94	92	92
query53	353	277	282	277
query54	937	425	434	425
query55	73	75	71	71
query56	250	221	230	221
query57	1241	1188	1151	1151
query58	226	204	194	194
query59	3591	3039	3051	3039
query60	261	235	241	235
query61	91	88	104	88
query62	682	472	494	472
query63	308	281	281	281
query64	8995	2240	1782	1782
query65	3150	3115	3103	3103
query66	858	340	329	329
query67	15626	15174	15145	15145
query68	4528	552	548	548
query69	478	299	302	299
query70	1159	1141	1135	1135
query71	426	275	273	273
query72	7255	2565	2380	2380
query73	717	318	320	318
query74	6710	6246	6263	6246
query75	3409	2631	2632	2631
query76	2705	1008	955	955
query77	372	286	267	267
query78	10552	10491	10155	10155
query79	2138	520	517	517
query80	1214	464	513	464
query81	547	253	245	245
query82	742	95	97	95
query83	258	169	167	167
query84	241	84	82	82
query85	1479	279	275	275
query86	480	320	282	282
query87	3391	3185	3128	3128
query88	3942	2366	2383	2366
query89	476	383	386	383
query90	1974	196	189	189
query91	126	104	97	97
query92	64	50	50	50
query93	1767	517	510	510
query94	1179	186	183	183
query95	394	308	308	308
query96	649	267	258	258
query97	3221	3006	3013	3006
query98	291	225	209	209
query99	1222	947	906	906
Total cold run time: 283738 ms
Total hot run time: 182574 ms

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 4, 2024

run buildall

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 4, 2024

run fe_ut

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 4, 2024

run performance

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 4, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17632	4327	4266	4266
q2	2030	200	199	199
q3	10460	1215	1182	1182
q4	10187	824	892	824
q5	7503	2770	2635	2635
q6	225	134	136	134
q7	985	623	612	612
q8	9224	2158	2083	2083
q9	8996	6697	6690	6690
q10	9854	3885	3903	3885
q11	450	257	246	246
q12	456	254	244	244
q13	17223	3274	3279	3274
q14	271	218	217	217
q15	507	470	474	470
q16	502	394	397	394
q17	984	674	672	672
q18	8252	7858	7697	7697
q19	5554	1360	1371	1360
q20	654	337	331	331
q21	5143	3272	4141	3272
q22	409	342	352	342
Total cold run time: 117501 ms
Total hot run time: 41029 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4595	4475	4440	4440
q2	381	276	262	262
q3	3112	2929	2922	2922
q4	1955	1633	1583	1583
q5	5373	5501	5540	5501
q6	221	125	127	125
q7	2205	1854	1851	1851
q8	3211	3375	3370	3370
q9	8681	8668	8642	8642
q10	4079	3874	3875	3874
q11	584	495	492	492
q12	773	599	598	598
q13	16898	3140	3182	3140
q14	311	274	274	274
q15	522	480	489	480
q16	503	453	432	432
q17	1798	1525	1505	1505
q18	7913	7658	7538	7538
q19	1754	1528	1527	1527
q20	3024	1779	1793	1779
q21	7962	4753	4666	4666
q22	613	561	556	556
Total cold run time: 76468 ms
Total hot run time: 55557 ms

@doris-robot
Copy link

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

query1	913	367	377	367
query2	6454	2452	2299	2299
query3	6649	208	209	208
query4	19694	17432	17260	17260
query5	4277	444	447	444
query6	258	164	158	158
query7	4603	303	301	301
query8	309	282	276	276
query9	8649	2455	2434	2434
query10	443	297	274	274
query11	10543	9906	9925	9906
query12	131	90	94	90
query13	1627	367	357	357
query14	8421	7837	7106	7106
query15	241	182	182	182
query16	7733	281	272	272
query17	1270	514	521	514
query18	1961	283	285	283
query19	227	152	152	152
query20	92	85	91	85
query21	209	130	132	130
query22	4255	4016	4117	4016
query23	33588	33004	33031	33004
query24	10881	2835	2949	2835
query25	603	350	359	350
query26	710	155	155	155
query27	2289	324	328	324
query28	5706	2107	2120	2107
query29	855	601	593	593
query30	273	151	152	151
query31	952	738	730	730
query32	95	54	53	53
query33	676	336	286	286
query34	842	473	469	469
query35	739	604	613	604
query36	1056	941	949	941
query37	137	67	72	67
query38	2841	2730	2732	2730
query39	846	764	779	764
query40	206	129	121	121
query41	55	51	52	51
query42	125	102	96	96
query43	567	563	540	540
query44	1080	726	759	726
query45	198	160	163	160
query46	1070	754	735	735
query47	1860	1760	1776	1760
query48	389	305	302	302
query49	944	403	433	403
query50	771	407	399	399
query51	6934	6750	6883	6750
query52	107	94	92	92
query53	349	295	297	295
query54	876	451	438	438
query55	73	76	72	72
query56	272	251	255	251
query57	1126	1049	1080	1049
query58	268	249	264	249
query59	3370	3402	3153	3153
query60	289	281	262	262
query61	94	101	130	101
query62	642	439	436	436
query63	311	287	290	287
query64	8496	2163	1705	1705
query65	3165	3095	3148	3095
query66	777	351	342	342
query67	15411	14839	14758	14758
query68	4481	552	540	540
query69	467	317	324	317
query70	1144	1059	1151	1059
query71	375	290	285	285
query72	7244	5631	5645	5631
query73	745	329	329	329
query74	5836	5511	5489	5489
query75	3335	2687	2707	2687
query76	2381	939	858	858
query77	458	302	298	298
query78	10481	9784	9816	9784
query79	1988	510	516	510
query80	1186	483	472	472
query81	601	222	223	222
query82	1041	102	105	102
query83	260	179	178	178
query84	265	89	90	89
query85	1230	324	314	314
query86	457	321	317	317
query87	3259	3109	3063	3063
query88	3579	2439	2453	2439
query89	474	400	389	389
query90	1731	195	190	190
query91	136	108	109	108
query92	62	50	50	50
query93	1783	519	500	500
query94	1203	204	198	198
query95	407	327	327	327
query96	606	280	266	266
query97	3226	3057	3009	3009
query98	244	238	221	221
query99	1211	815	848	815
Total cold run time: 263769 ms
Total hot run time: 172961 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.23 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit afd5858690e8eadc8e04b151ae04b89d86778cc3, 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.07
query5	0.51	0.50	0.50
query6	1.12	0.72	0.72
query7	0.02	0.02	0.02
query8	0.05	0.04	0.04
query9	0.54	0.49	0.47
query10	0.53	0.55	0.55
query11	0.15	0.12	0.11
query12	0.15	0.12	0.12
query13	0.60	0.59	0.60
query14	0.79	0.78	0.77
query15	0.83	0.82	0.80
query16	0.37	0.37	0.37
query17	1.04	1.01	1.03
query18	0.20	0.26	0.21
query19	1.80	1.78	1.75
query20	0.02	0.01	0.02
query21	15.43	0.69	0.68
query22	5.35	6.84	1.47
query23	18.32	1.36	1.28
query24	1.92	0.23	0.21
query25	0.15	0.09	0.08
query26	0.26	0.18	0.17
query27	0.08	0.08	0.08
query28	13.27	1.02	0.99
query29	13.34	3.31	3.30
query30	0.24	0.06	0.05
query31	2.89	0.39	0.40
query32	3.26	0.47	0.46
query33	2.92	2.92	2.96
query34	17.23	4.41	4.38
query35	4.45	4.47	4.67
query36	0.65	0.49	0.48
query37	0.17	0.15	0.16
query38	0.15	0.15	0.16
query39	0.04	0.04	0.03
query40	0.16	0.16	0.14
query41	0.10	0.05	0.05
query42	0.05	0.04	0.04
query43	0.04	0.03	0.04
Total cold run time: 111.22 s
Total hot run time: 30.23 s

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 4, 2024

run cloud_p0

dataroaring
dataroaring previously approved these changes Jun 4, 2024
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

Copy link
Contributor

github-actions bot commented Jun 4, 2024

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 Jun 4, 2024
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jun 5, 2024
@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 5, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17687	4722	4238	4238
q2	2032	197	189	189
q3	10519	1238	1198	1198
q4	10205	829	862	829
q5	7491	2776	2818	2776
q6	235	138	138	138
q7	954	626	617	617
q8	9217	2133	2110	2110
q9	9442	6709	6677	6677
q10	9120	3916	3861	3861
q11	475	251	247	247
q12	428	236	239	236
q13	17398	3341	3231	3231
q14	279	228	235	228
q15	529	471	488	471
q16	512	425	401	401
q17	987	604	689	604
q18	8462	7768	8001	7768
q19	5859	1304	1363	1304
q20	633	332	317	317
q21	5175	3304	3920	3304
q22	411	352	349	349
Total cold run time: 118050 ms
Total hot run time: 41093 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4642	4515	4486	4486
q2	380	273	273	273
q3	3133	2876	2911	2876
q4	2013	1667	1621	1621
q5	5345	5519	5494	5494
q6	223	128	131	128
q7	2191	1805	1800	1800
q8	3239	3367	3401	3367
q9	8764	8644	8732	8644
q10	4105	3849	3835	3835
q11	609	515	485	485
q12	774	600	592	592
q13	16195	3047	3111	3047
q14	304	269	268	268
q15	540	486	476	476
q16	479	428	431	428
q17	1809	1523	1476	1476
q18	8093	7877	7388	7388
q19	1791	1558	1625	1558
q20	3036	1793	1771	1771
q21	4834	4662	4852	4662
q22	701	527	535	527
Total cold run time: 73200 ms
Total hot run time: 55202 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172097 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 029385e7e4b214c84bc98b61ef11682f35e15ebe, data reload: false

query1	902	378	376	376
query2	6442	2506	2265	2265
query3	6641	208	207	207
query4	19776	17204	17287	17204
query5	4122	476	454	454
query6	246	162	160	160
query7	4599	291	293	291
query8	303	291	280	280
query9	8512	2491	2487	2487
query10	451	299	279	279
query11	11233	10023	9873	9873
query12	134	89	85	85
query13	1631	365	364	364
query14	10128	6970	7775	6970
query15	231	188	181	181
query16	7278	274	262	262
query17	1292	520	522	520
query18	1919	269	272	269
query19	204	156	160	156
query20	92	86	86	86
query21	209	136	134	134
query22	4255	3918	4064	3918
query23	33716	33074	32888	32888
query24	11152	2895	2768	2768
query25	625	365	360	360
query26	1575	153	157	153
query27	3016	319	319	319
query28	7068	2081	2093	2081
query29	1041	625	605	605
query30	279	152	150	150
query31	950	750	728	728
query32	84	52	54	52
query33	757	289	283	283
query34	967	484	474	474
query35	766	613	608	608
query36	1077	920	917	917
query37	154	68	72	68
query38	2852	2767	2743	2743
query39	838	776	797	776
query40	267	125	124	124
query41	53	51	55	51
query42	122	98	95	95
query43	580	541	524	524
query44	1231	723	757	723
query45	193	168	164	164
query46	1069	735	715	715
query47	1893	1773	1780	1773
query48	367	291	284	284
query49	1064	406	413	406
query50	780	390	400	390
query51	6920	6809	6718	6718
query52	106	92	91	91
query53	359	293	317	293
query54	861	445	444	444
query55	75	73	74	73
query56	283	261	256	256
query57	1116	1051	1055	1051
query58	266	255	249	249
query59	3539	3375	3138	3138
query60	305	268	274	268
query61	88	88	88	88
query62	618	432	442	432
query63	317	298	298	298
query64	9967	2239	1775	1775
query65	3151	3116	3113	3113
query66	1132	322	334	322
query67	15426	14879	15011	14879
query68	4464	539	528	528
query69	458	303	310	303
query70	1188	1050	1138	1050
query71	369	353	293	293
query72	7082	5225	5200	5200
query73	753	322	324	322
query74	5905	5528	5509	5509
query75	3323	2667	2692	2667
query76	2350	911	1014	911
query77	429	313	283	283
query78	10457	9910	9957	9910
query79	1030	533	517	517
query80	2101	490	475	475
query81	561	227	228	227
query82	1255	104	108	104
query83	314	167	170	167
query84	258	89	84	84
query85	990	318	315	315
query86	331	275	400	275
query87	3293	3055	3069	3055
query88	2989	2332	2346	2332
query89	470	389	378	378
query90	1896	191	203	191
query91	128	99	97	97
query92	63	51	50	50
query93	999	516	512	512
query94	1216	202	184	184
query95	397	311	322	311
query96	579	268	271	268
query97	3223	2982	3027	2982
query98	250	217	217	217
query99	1062	849	872	849
Total cold run time: 269848 ms
Total hot run time: 172097 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.08	0.04	0.04
query3	0.23	0.06	0.05
query4	1.65	0.07	0.07
query5	0.48	0.50	0.50
query6	1.11	0.73	0.73
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.53	0.51	0.50
query10	0.54	0.54	0.55
query11	0.16	0.11	0.11
query12	0.15	0.13	0.12
query13	0.59	0.59	0.60
query14	0.77	0.77	0.78
query15	0.85	0.81	0.82
query16	0.37	0.36	0.37
query17	0.95	0.98	1.00
query18	0.21	0.24	0.23
query19	1.88	1.70	1.76
query20	0.01	0.02	0.01
query21	15.49	0.69	0.65
query22	3.64	7.25	2.13
query23	18.26	1.36	1.22
query24	1.75	0.23	0.27
query25	0.15	0.08	0.08
query26	0.28	0.17	0.17
query27	0.08	0.08	0.07
query28	13.26	1.02	1.01
query29	13.59	3.33	3.33
query30	0.26	0.07	0.05
query31	2.87	0.39	0.39
query32	3.25	0.48	0.47
query33	2.88	2.89	2.88
query34	17.04	4.42	4.42
query35	4.51	4.51	4.58
query36	0.66	0.46	0.46
query37	0.18	0.16	0.16
query38	0.15	0.15	0.14
query39	0.04	0.03	0.04
query40	0.16	0.14	0.15
query41	0.09	0.05	0.04
query42	0.05	0.05	0.04
query43	0.04	0.04	0.03
Total cold run time: 109.35 s
Total hot run time: 30.84 s

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 5, 2024

run cloud_ut

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 5, 2024

run p0

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Jun 5, 2024

run cloudut

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 5, 2024
Copy link
Contributor

github-actions bot commented Jun 5, 2024

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

@dataroaring dataroaring merged commit 0a5a18b into apache:master Jun 5, 2024
26 of 28 checks passed
dataroaring pushed a commit that referenced this pull request Jun 7, 2024
## Proposed changes

### Purpose

The user doc:
https://doris.apache.org/zh-CN/docs/dev/data-operate/import/transaction-load-manual

We have supported insert into
select(#31666),
update(#33034) and
delete(#33100) in transaction load.

#32980 implements one txn write to
one partition more than one rowsets.

This pr implements to cloud mode of
#32980

### Implementation

#### sub_txn_id

see #32980

#### Meta service supports commit txn

This process is generally the same as commit_txn, the difference is that
he partitions version will plus 1 in multi sub txns.

One example:
Suppose the table, partition, tablet and version info is:
```
--------------------------------------------
| table | partition | tablet    | version |
--------------------------------------------
| t1    | t1_p1     | t1_p1.1   | 1       |
| t1    | t1_p1     | t1_p1.2   | 1       |
| t1    | t1_p2     | t1_p2.1   | 2       |
| t2    | t2_p3     | t2_p3.1   | 3       |
| t2    | t2_p4     | t2_p4.1   | 4       |
--------------------------------------------
```

Now we commit a txn with 3 sub txns and the tablets are:
 *  sub_txn1: t1_p1.1, t1_p1.2, t1_p2.1
 *  sub_txn2: t2_p3.1
 *  sub_txn3: t1_p1.1, t1_p1.2

When commit, the partitions version will be:
 *  sub_txn1: t1_p1(1 -> 2), t1_p2(2 -> 3)
 *  sub_txn2: t2_p3(3 -> 4)
 *  sub_txn3: t1_p1(2 -> 3)

After commit, the partitions version will be:
 *  t1: t1_p1(3), t1_p2(3)
 *  t2: t2_p3(4), t2_p4(4)

#### Meta service support generate sub_txn_id by `begin_sub_txn`
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. meta-change reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants