Skip to content

Conversation

@yujun777
Copy link
Contributor

@yujun777 yujun777 commented Sep 12, 2024

When given a tablet, for multiple frontends, this tablet's backends maybe different. Because when a tablet's backend shutdown, the frontends will immedidately change the tablet to a live backend using hash alg. Because changed no write editlog, so the changed is not aync. It may result in a tablet relocating to different backends for different frontends. To fix this problem, each tablet introduces two be id: primary be id and secondary be id. Only master fe can change primary be id actively, and it will write an editlog. So it will ensure all frontends have the same primary be. For a tablet, if its primary be is alive, then use it as its backend, if its primary be is dead, then can chose a secondary be as its backend.

More details:

  1. when be dead over 1h(Config.rehash_tablet_after_be_dead_seconds), change none-colocate tablet's primary be id to its secondary be id;
  2. don't balance on colocate table, and colocate table don't save their primary be id;
  3. colocate table rehash on "alive be + be dead less 1h(Config.rehash_tablet_after_be_dead_seconds)" sets, but if the gotten be is dead, change to an alive be. This both ensure availability and avoid all tablets rehashing when be dead for a short time;
  4. colocate tablet rehash on group id + bucket index;
  5. rehash prefer to skip the decommission be;
  6. 'show backends' will print the right tablet num of each backend;
  7. cloud tablet show PrimaryBackendId

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

@yujun777 yujun777 force-pushed the fe-consistent-tablet-view branch 5 times, most recently from 864a5db to 69901d8 Compare September 18, 2024 10:20
@yujun777
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17970	7665	7268	7268
q2	2040	186	160	160
q3	10682	1086	1178	1086
q4	10481	830	794	794
q5	7765	3124	3076	3076
q6	233	151	146	146
q7	1009	621	588	588
q8	9455	2041	2086	2041
q9	6910	6419	6385	6385
q10	7025	2309	2315	2309
q11	443	247	250	247
q12	417	219	216	216
q13	17776	3014	3015	3014
q14	237	213	216	213
q15	571	520	515	515
q16	688	612	602	602
q17	1009	781	809	781
q18	7272	6777	6662	6662
q19	1403	1049	1043	1043
q20	565	287	289	287
q21	3996	3248	3306	3248
q22	1105	1023	1021	1021
Total cold run time: 109052 ms
Total hot run time: 41702 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7257	7230	7207	7207
q2	322	228	220	220
q3	3032	3003	2946	2946
q4	2048	1777	1850	1777
q5	5563	5599	5670	5599
q6	235	147	143	143
q7	2219	1771	1825	1771
q8	3334	3465	3395	3395
q9	8852	8985	8820	8820
q10	3478	3479	3492	3479
q11	596	498	482	482
q12	799	614	642	614
q13	10008	3183	3191	3183
q14	315	283	272	272
q15	571	534	528	528
q16	736	667	697	667
q17	1839	1625	1578	1578
q18	8274	7901	7786	7786
q19	1735	1688	1653	1653
q20	2151	1900	1895	1895
q21	5446	5424	5268	5268
q22	1188	1079	1079	1079
Total cold run time: 69998 ms
Total hot run time: 60362 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 199762 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 69901d839e7b4fd772aa24e9f4abfc28c29b2d19, data reload: false

query1	1290	879	892	879
query2	6365	2097	2070	2070
query3	10778	4080	3849	3849
query4	65483	29746	23456	23456
query5	5038	487	494	487
query6	409	166	167	166
query7	5466	298	291	291
query8	312	228	218	218
query9	8772	2673	2656	2656
query10	440	306	297	297
query11	17497	15270	15774	15270
query12	162	105	101	101
query13	1480	430	416	416
query14	10879	7101	7582	7101
query15	206	177	170	170
query16	6388	496	485	485
query17	1174	607	581	581
query18	1364	326	336	326
query19	212	155	160	155
query20	120	112	111	111
query21	217	103	108	103
query22	4841	4692	4750	4692
query23	34699	34011	33881	33881
query24	6042	2935	2894	2894
query25	496	410	411	410
query26	658	159	164	159
query27	1717	282	292	282
query28	4110	2498	2423	2423
query29	678	439	434	434
query30	232	164	153	153
query31	965	793	795	793
query32	70	54	55	54
query33	430	289	295	289
query34	904	504	503	503
query35	858	760	719	719
query36	1056	923	942	923
query37	151	89	85	85
query38	4037	3905	3966	3905
query39	1480	1405	1411	1405
query40	214	98	97	97
query41	51	48	49	48
query42	122	98	101	98
query43	521	486	489	486
query44	1159	822	801	801
query45	196	166	165	165
query46	1146	760	768	760
query47	1911	1830	1823	1823
query48	496	367	366	366
query49	720	427	418	418
query50	826	415	405	405
query51	7214	6925	6887	6887
query52	98	85	85	85
query53	253	182	178	178
query54	570	454	455	454
query55	81	77	77	77
query56	263	263	267	263
query57	1202	1082	1087	1082
query58	216	238	247	238
query59	3178	2842	2985	2842
query60	290	264	258	258
query61	105	118	97	97
query62	747	645	642	642
query63	221	185	190	185
query64	1366	640	677	640
query65	3279	3185	3167	3167
query66	686	304	297	297
query67	15963	15709	15569	15569
query68	1248	859	868	859
query69	444	364	360	360
query70	1193	1142	1194	1142
query71	359	342	340	340
query72	6052	3393	3524	3393
query73	599	590	576	576
query74	9349	9106	9053	9053
query75	2983	2895	2853	2853
query76	1219	888	896	888
query77	510	371	366	366
query78	9502	9310	9313	9310
query79	915	899	873	873
query80	585	573	616	573
query81	460	251	258	251
query82	236	234	232	232
query83	166	156	157	156
query84	271	111	101	101
query85	673	366	355	355
query86	321	329	327	327
query87	4386	4337	4342	4337
query88	4475	4084	4094	4084
query89	385	362	358	358
query90	1582	316	317	316
query91	166	160	163	160
query92	74	74	74	74
query93	922	888	904	888
query94	561	383	368	368
query95	426	412	415	412
query96	495	492	491	491
query97	3192	3166	3132	3132
query98	233	233	225	225
query99	1439	1296	1289	1289
Total cold run time: 305991 ms
Total hot run time: 199762 ms

@yujun777 yujun777 force-pushed the fe-consistent-tablet-view branch from b530068 to 813d3ea Compare September 19, 2024 02:13
@yujun777
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17978	8441	7352	7352
q2	2065	164	168	164
q3	10859	1104	1219	1104
q4	10538	741	777	741
q5	7754	3129	3125	3125
q6	236	148	154	148
q7	1016	630	602	602
q8	9439	2089	2091	2089
q9	6983	6473	6494	6473
q10	7013	2313	2332	2313
q11	436	256	260	256
q12	409	221	224	221
q13	17829	3014	3011	3011
q14	261	234	220	220
q15	605	565	549	549
q16	695	627	620	620
q17	989	802	805	802
q18	7819	6804	6821	6804
q19	1401	976	1070	976
q20	593	303	294	294
q21	4152	3291	3419	3291
q22	1129	1002	1006	1002
Total cold run time: 110199 ms
Total hot run time: 42157 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7346	7264	7320	7264
q2	336	237	232	232
q3	3187	3053	2984	2984
q4	2075	1849	1768	1768
q5	5634	5668	5781	5668
q6	232	152	147	147
q7	2264	1817	1820	1817
q8	3396	3526	3484	3484
q9	8948	9018	8880	8880
q10	3458	3472	3568	3472
q11	602	498	491	491
q12	785	618	625	618
q13	8872	3245	3190	3190
q14	302	279	267	267
q15	608	571	542	542
q16	739	682	695	682
q17	1904	1624	1634	1624
q18	8542	7839	7992	7839
q19	1712	1512	1552	1512
q20	2180	1896	1890	1890
q21	5918	5488	5512	5488
q22	1153	1054	1063	1054
Total cold run time: 70193 ms
Total hot run time: 60913 ms

@yujun777
Copy link
Contributor Author

run buildall

@yujun777 yujun777 marked this pull request as ready for review September 19, 2024 03:25
@yujun777 yujun777 changed the title [draft](cloud rebalance) make master / follower fe consistent view of tablet location [improvement](cloud rebalance) make multiple fe consistent for tablet's backend Sep 19, 2024
@yujun777 yujun777 changed the title [improvement](cloud rebalance) make multiple fe consistent for tablet's backend [improvement](cloud rebalance) make multiple fe consistent of tablet's backend Sep 19, 2024
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17689	7449	7282	7282
q2	2020	182	174	174
q3	10624	1837	1208	1208
q4	10305	743	825	743
q5	7468	1228	1170	1170
q6	216	155	159	155
q7	951	522	549	522
q8	9358	1500	1467	1467
q9	8346	7047	7038	7038
q10	9647	5075	5115	5075
q11	450	275	271	271
q12	464	226	224	224
q13	17776	2985	3015	2985
q14	465	446	444	444
q15	639	569	571	569
q16	761	640	666	640
q17	993	843	809	809
q18	7591	6902	6993	6902
q19	1416	884	1085	884
q20	649	332	323	323
q21	4001	3611	3543	3543
q22	374	310	308	308
Total cold run time: 112203 ms
Total hot run time: 42736 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7290	7241	7288	7241
q2	611	522	532	522
q3	3080	2954	2947	2947
q4	2115	1907	1840	1840
q5	5638	5640	5696	5640
q6	229	147	149	147
q7	8711	8114	8093	8093
q8	3634	3821	3769	3769
q9	17820	18331	18284	18284
q10	5512	5469	5446	5446
q11	1404	1227	1246	1227
q12	863	642	598	598
q13	17382	3194	3167	3167
q14	459	424	437	424
q15	596	575	578	575
q16	816	741	744	741
q17	3177	2895	2876	2876
q18	8521	8056	7875	7875
q19	1819	1592	1673	1592
q20	2201	1953	1948	1948
q21	12851	11668	11761	11668
q22	1098	521	508	508
Total cold run time: 105827 ms
Total hot run time: 87128 ms

@yujun777
Copy link
Contributor Author

run performance

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17596	7391	7285	7285
q2	2061	172	164	164
q3	10896	1121	1245	1121
q4	10579	736	777	736
q5	7752	3145	3110	3110
q6	237	151	149	149
q7	1029	626	607	607
q8	9448	2092	2101	2092
q9	6857	6450	6494	6450
q10	7078	2265	2299	2265
q11	449	257	253	253
q12	418	218	217	217
q13	17786	3023	2967	2967
q14	233	213	214	213
q15	591	514	524	514
q16	673	619	632	619
q17	1003	841	831	831
q18	7488	6874	6790	6790
q19	1425	985	1008	985
q20	591	292	290	290
q21	4066	3227	3273	3227
q22	1110	1025	1019	1019
Total cold run time: 109366 ms
Total hot run time: 41904 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7269	7267	7234	7234
q2	327	230	240	230
q3	3124	3009	2975	2975
q4	2067	1832	1929	1832
q5	5598	5649	5677	5649
q6	239	146	146	146
q7	2233	1849	1800	1800
q8	3339	3426	3473	3426
q9	8957	9080	8945	8945
q10	3476	3467	3500	3467
q11	589	486	476	476
q12	822	602	633	602
q13	15443	3124	3174	3124
q14	295	272	265	265
q15	560	531	514	514
q16	707	663	677	663
q17	1847	1640	1590	1590
q18	8204	7720	7934	7720
q19	1754	1613	1583	1583
q20	2134	1913	1916	1913
q21	5599	5460	5456	5456
q22	1128	1071	1062	1062
Total cold run time: 75711 ms
Total hot run time: 60672 ms

@yujun777 yujun777 force-pushed the fe-consistent-tablet-view branch from 3c6112e to 6b000ab Compare September 19, 2024 06:31
@yujun777
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17950	7391	7310	7310
q2	2042	180	159	159
q3	10652	1107	1191	1107
q4	10298	725	770	725
q5	7740	3119	3085	3085
q6	243	147	153	147
q7	1022	612	590	590
q8	9431	2066	2055	2055
q9	6938	6428	6433	6428
q10	7006	2289	2270	2270
q11	441	252	248	248
q12	412	218	214	214
q13	17788	2988	2962	2962
q14	240	216	221	216
q15	578	532	522	522
q16	667	643	596	596
q17	987	853	848	848
q18	7398	6644	6630	6630
q19	1406	1114	1083	1083
q20	591	294	299	294
q21	4023	3143	3231	3143
q22	1132	1010	1023	1010
Total cold run time: 108985 ms
Total hot run time: 41642 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7198	7212	7197	7197
q2	327	234	223	223
q3	3010	2951	2942	2942
q4	2043	1854	1853	1853
q5	5635	5628	5606	5606
q6	238	144	144	144
q7	2217	1849	1771	1771
q8	3328	3421	3456	3421
q9	8830	9032	8858	8858
q10	3516	3421	3535	3421
q11	574	475	468	468
q12	795	619	640	619
q13	10281	3146	3199	3146
q14	304	282	296	282
q15	571	536	528	528
q16	704	659	657	657
q17	1814	1603	1562	1562
q18	8311	7823	7812	7812
q19	1724	1530	1696	1530
q20	2133	1904	1886	1886
q21	5617	5229	5419	5229
q22	1165	1055	1062	1055
Total cold run time: 70335 ms
Total hot run time: 60210 ms

@doris-robot
Copy link

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

query1	1280	896	896	896
query2	6302	2136	2073	2073
query3	10806	3876	3861	3861
query4	63336	27064	23446	23446
query5	5345	465	487	465
query6	415	170	164	164
query7	5494	302	305	302
query8	308	223	223	223
query9	8758	2646	2676	2646
query10	474	295	286	286
query11	17908	15350	15858	15350
query12	169	111	111	111
query13	1477	437	438	437
query14	10929	7974	7741	7741
query15	210	174	175	174
query16	7187	530	508	508
query17	1152	620	585	585
query18	1967	313	314	313
query19	229	158	162	158
query20	135	112	107	107
query21	214	106	104	104
query22	4920	4717	4883	4717
query23	34677	34066	33985	33985
query24	5977	2899	2922	2899
query25	518	407	405	405
query26	650	171	166	166
query27	1611	288	290	288
query28	4461	2531	2476	2476
query29	678	450	437	437
query30	231	156	153	153
query31	1009	808	817	808
query32	75	53	57	53
query33	427	299	303	299
query34	905	508	489	489
query35	864	724	726	724
query36	1060	940	972	940
query37	147	92	92	92
query38	3972	3936	4081	3936
query39	1481	1425	1430	1425
query40	208	99	99	99
query41	52	52	49	49
query42	126	104	100	100
query43	527	505	522	505
query44	1158	818	799	799
query45	192	167	174	167
query46	1130	752	786	752
query47	1944	1838	1817	1817
query48	452	356	379	356
query49	699	409	410	409
query50	857	424	427	424
query51	7140	6790	6870	6790
query52	100	86	83	83
query53	254	184	184	184
query54	560	458	453	453
query55	78	74	78	74
query56	285	250	260	250
query57	1225	1121	1100	1100
query58	232	244	241	241
query59	3091	2939	2857	2857
query60	284	278	270	270
query61	108	104	106	104
query62	786	666	681	666
query63	220	184	184	184
query64	1632	632	644	632
query65	3254	3171	3221	3171
query66	678	290	303	290
query67	15979	15542	15631	15542
query68	4552	593	583	583
query69	449	299	289	289
query70	1187	1091	1149	1091
query71	343	274	272	272
query72	6391	4014	3973	3973
query73	774	324	329	324
query74	9832	8924	8965	8924
query75	3370	2648	2720	2648
query76	1814	882	868	868
query77	479	303	299	299
query78	9885	9205	9146	9146
query79	1129	556	544	544
query80	916	450	446	446
query81	547	248	244	244
query82	265	142	142	142
query83	156	136	137	136
query84	285	86	80	80
query85	894	297	277	277
query86	347	296	308	296
query87	4442	4485	4331	4331
query88	3153	2352	2388	2352
query89	405	290	282	282
query90	2113	189	189	189
query91	184	145	146	145
query92	62	51	45	45
query93	1547	558	538	538
query94	770	302	306	302
query95	362	257	249	249
query96	621	286	281	281
query97	3225	3063	3132	3063
query98	219	201	185	185
query99	2009	1280	1276	1276
Total cold run time: 313736 ms
Total hot run time: 196430 ms

@doris-robot
Copy link

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

query1	0.04	0.05	0.04
query2	0.09	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.10	0.10
query5	0.51	0.51	0.51
query6	1.13	0.74	0.74
query7	0.02	0.02	0.02
query8	0.05	0.04	0.04
query9	0.56	0.53	0.48
query10	0.57	0.55	0.53
query11	0.15	0.12	0.12
query12	0.15	0.13	0.12
query13	0.61	0.60	0.60
query14	3.15	2.97	3.01
query15	0.92	0.85	0.82
query16	0.37	0.37	0.38
query17	1.04	1.03	1.06
query18	0.17	0.18	0.17
query19	1.96	1.88	1.94
query20	0.02	0.01	0.01
query21	15.37	0.66	0.65
query22	3.98	7.35	2.24
query23	18.26	1.26	1.28
query24	2.12	0.24	0.21
query25	0.15	0.08	0.09
query26	0.29	0.19	0.18
query27	0.08	0.08	0.07
query28	13.25	1.16	1.15
query29	12.64	3.33	3.30
query30	0.24	0.05	0.05
query31	2.87	0.42	0.41
query32	3.23	0.48	0.48
query33	2.99	3.01	3.06
query34	17.10	4.49	4.46
query35	4.58	4.45	4.52
query36	0.66	0.48	0.49
query37	0.19	0.16	0.16
query38	0.15	0.15	0.16
query39	0.05	0.04	0.04
query40	0.16	0.14	0.13
query41	0.10	0.05	0.05
query42	0.06	0.04	0.05
query43	0.05	0.04	0.04
Total cold run time: 111.99 s
Total hot run time: 33.73 s

public static boolean enable_immediate_be_assign = true;
@ConfField(mutable = true, masterOnly = true,
description = {"存算分离模式下,当tablet分布的be异常,是否立即映射tablet到新的be上,默认false"})
public static boolean enable_immediate_be_assign = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems a behavior change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this seems a behavior change

默认要开启新算法。这个开关关了,那还是走旧算法

@gavinchou
Copy link
Contributor

Add more background and why we choose the solution and what is the trade off

@yujun777 yujun777 force-pushed the fe-consistent-tablet-view branch from 0d86f33 to 58b3daa Compare September 25, 2024 07:30
@yujun777
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17949	8414	7372	7372
q2	2024	293	325	293
q3	10415	1224	1203	1203
q4	10560	761	699	699
q5	7811	2961	2915	2915
q6	245	157	158	157
q7	1017	631	630	630
q8	9537	1929	2005	1929
q9	7804	6375	6390	6375
q10	7022	2329	2308	2308
q11	443	250	242	242
q12	411	219	217	217
q13	17777	2967	2955	2955
q14	242	206	215	206
q15	590	537	517	517
q16	687	622	635	622
q17	1018	698	516	516
q18	7357	6739	6821	6739
q19	1451	1083	1107	1083
q20	579	290	292	290
q21	3915	3362	3138	3138
q22	1074	1005	987	987
Total cold run time: 109928 ms
Total hot run time: 41393 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7352	7247	7301	7247
q2	349	245	232	232
q3	3073	2957	2938	2938
q4	2063	1889	1794	1794
q5	5740	5667	5834	5667
q6	236	144	156	144
q7	2219	1866	1839	1839
q8	3398	3567	3546	3546
q9	9017	8867	8888	8867
q10	3582	3600	3575	3575
q11	590	497	497	497
q12	838	631	657	631
q13	11081	3195	3199	3195
q14	325	303	263	263
q15	571	522	517	517
q16	717	673	666	666
q17	1875	1611	1594	1594
q18	8261	7938	7908	7908
q19	1712	1486	1490	1486
q20	2118	1886	1914	1886
q21	5364	5449	5404	5404
q22	1149	1044	1026	1026
Total cold run time: 71630 ms
Total hot run time: 60922 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192726 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 58b3daa483daba9680c4af59a9beafa0d234594c, data reload: false

query1	962	379	400	379
query2	6361	2053	2071	2053
query3	8680	197	208	197
query4	34117	23628	23529	23529
query5	3460	464	458	458
query6	266	177	161	161
query7	4193	297	307	297
query8	290	222	223	222
query9	9297	2705	2690	2690
query10	444	285	283	283
query11	18156	15217	15149	15149
query12	155	97	96	96
query13	1538	438	409	409
query14	10316	7629	7742	7629
query15	299	177	178	177
query16	7375	535	444	444
query17	1686	602	593	593
query18	2000	319	327	319
query19	372	157	156	156
query20	124	118	124	118
query21	215	109	108	108
query22	4814	4376	4513	4376
query23	35303	34367	34567	34367
query24	11437	2951	2844	2844
query25	621	412	431	412
query26	1146	164	161	161
query27	2435	289	288	288
query28	7692	2450	2440	2440
query29	840	437	431	431
query30	264	158	161	158
query31	1011	801	780	780
query32	96	52	55	52
query33	739	298	307	298
query34	921	493	502	493
query35	876	731	759	731
query36	1097	945	960	945
query37	147	89	96	89
query38	3984	3938	3944	3938
query39	1484	1411	1432	1411
query40	260	97	100	97
query41	50	51	45	45
query42	124	95	93	93
query43	532	491	497	491
query44	1274	819	806	806
query45	197	164	164	164
query46	1141	716	692	692
query47	1918	1805	1850	1805
query48	467	383	376	376
query49	896	408	396	396
query50	837	423	409	409
query51	7075	6978	6820	6820
query52	103	85	89	85
query53	259	187	209	187
query54	1253	458	461	458
query55	81	80	78	78
query56	295	255	274	255
query57	1251	1108	1113	1108
query58	245	234	248	234
query59	3270	3038	2979	2979
query60	302	278	277	277
query61	123	107	108	107
query62	840	661	689	661
query63	224	192	190	190
query64	5026	661	616	616
query65	3305	3205	3219	3205
query66	1304	302	314	302
query67	15979	15648	15730	15648
query68	4534	548	555	548
query69	616	306	294	294
query70	1185	1121	1110	1110
query71	424	274	271	271
query72	7556	4101	4133	4101
query73	769	350	354	350
query74	10541	9037	9010	9010
query75	4138	2684	2679	2679
query76	3570	939	898	898
query77	619	289	309	289
query78	10314	9534	9429	9429
query79	1193	592	588	588
query80	854	467	468	467
query81	579	242	243	242
query82	524	141	151	141
query83	339	136	136	136
query84	273	82	80	80
query85	1479	293	282	282
query86	459	272	288	272
query87	4468	4423	4263	4263
query88	3100	2447	2369	2369
query89	412	288	290	288
query90	2101	190	191	190
query91	175	146	143	143
query92	69	48	48	48
query93	1744	537	540	537
query94	1190	304	306	304
query95	369	254	263	254
query96	624	279	280	279
query97	3285	3114	3123	3114
query98	218	202	195	195
query99	1515	1294	1290	1290
Total cold run time: 303080 ms
Total hot run time: 192726 ms

@yujun777
Copy link
Contributor Author

run buildall

@yujun777 yujun777 force-pushed the fe-consistent-tablet-view branch from 3c96447 to 7a077a8 Compare September 27, 2024 03:05
@yujun777
Copy link
Contributor Author

run buildall

@yujun777 yujun777 force-pushed the fe-consistent-tablet-view branch from 7a077a8 to 080f139 Compare September 27, 2024 03:12
@yujun777
Copy link
Contributor Author

run buildall

@yujun777
Copy link
Contributor Author

run feut

1 similar comment
@yujun777
Copy link
Contributor Author

run feut

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18009	7517	7280	7280
q2	2021	278	288	278
q3	11843	1082	1206	1082
q4	10376	787	721	721
q5	7777	2943	2846	2846
q6	246	160	158	158
q7	975	616	610	610
q8	9373	1920	1948	1920
q9	6666	6467	6425	6425
q10	7010	2333	2308	2308
q11	440	253	247	247
q12	408	224	217	217
q13	17818	2972	3004	2972
q14	240	209	220	209
q15	584	532	519	519
q16	667	591	580	580
q17	980	553	522	522
q18	7419	6818	6604	6604
q19	1403	1041	1067	1041
q20	467	202	201	201
q21	3999	3266	3197	3197
q22	1101	990	1018	990
Total cold run time: 109822 ms
Total hot run time: 40927 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7243	7294	7309	7294
q2	330	233	238	233
q3	3057	2980	2932	2932
q4	2115	1871	1824	1824
q5	5750	5770	5817	5770
q6	229	144	148	144
q7	2249	1884	1834	1834
q8	3408	3487	3480	3480
q9	8925	8948	8886	8886
q10	3612	3565	3548	3548
q11	575	491	489	489
q12	895	660	641	641
q13	9578	3174	3181	3174
q14	318	288	273	273
q15	582	507	515	507
q16	669	650	637	637
q17	1848	1632	1636	1632
q18	8412	7816	7616	7616
q19	1730	1590	1427	1427
q20	2116	1858	1859	1858
q21	5492	5456	5533	5456
q22	1177	1030	1039	1030
Total cold run time: 70310 ms
Total hot run time: 60685 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191242 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 080f1396cf2a0fcaa1af50031eae0eb13cc1bb5c, data reload: false

query1	877	397	403	397
query2	6248	2061	2027	2027
query3	8682	201	216	201
query4	33426	23398	23416	23398
query5	3503	454	467	454
query6	276	167	164	164
query7	4210	308	300	300
query8	273	220	211	211
query9	9288	2681	2679	2679
query10	478	286	294	286
query11	17864	15108	15235	15108
query12	147	101	98	98
query13	1536	431	408	408
query14	8871	7750	7104	7104
query15	252	167	180	167
query16	7933	458	477	458
query17	1585	577	612	577
query18	2102	330	319	319
query19	336	157	151	151
query20	120	111	110	110
query21	221	106	111	106
query22	5017	4780	4561	4561
query23	34972	34094	33760	33760
query24	11023	2842	2842	2842
query25	631	420	404	404
query26	1157	162	163	162
query27	2207	300	310	300
query28	7116	2447	2443	2443
query29	829	441	433	433
query30	261	150	156	150
query31	1032	815	819	815
query32	100	55	56	55
query33	766	303	300	300
query34	961	483	506	483
query35	879	739	726	726
query36	1119	951	958	951
query37	156	93	85	85
query38	4061	3910	3866	3866
query39	1539	1422	1428	1422
query40	198	102	98	98
query41	51	48	52	48
query42	114	97	101	97
query43	534	494	488	488
query44	1218	823	796	796
query45	197	165	171	165
query46	1150	731	727	727
query47	1952	1828	1877	1828
query48	460	383	378	378
query49	946	415	415	415
query50	850	399	399	399
query51	7081	6900	6925	6900
query52	100	91	92	91
query53	265	181	177	177
query54	1285	474	463	463
query55	81	77	77	77
query56	274	272	270	270
query57	1227	1122	1136	1122
query58	241	237	247	237
query59	3264	3001	2897	2897
query60	300	271	268	268
query61	102	102	102	102
query62	894	675	672	672
query63	227	189	183	183
query64	3987	659	621	621
query65	3241	3169	3177	3169
query66	848	326	299	299
query67	15807	15549	15837	15549
query68	4506	583	590	583
query69	544	294	309	294
query70	1151	1119	1051	1051
query71	384	288	266	266
query72	7596	4074	3783	3783
query73	769	345	349	345
query74	10269	8981	8975	8975
query75	4097	2687	2655	2655
query76	3325	954	952	952
query77	616	314	308	308
query78	10652	9597	9551	9551
query79	2630	620	622	620
query80	2743	462	447	447
query81	574	235	237	235
query82	687	137	140	137
query83	302	134	139	134
query84	283	82	73	73
query85	1690	295	286	286
query86	478	307	298	298
query87	4516	4305	4247	4247
query88	3504	2421	2368	2368
query89	405	291	282	282
query90	2131	188	183	183
query91	182	142	144	142
query92	66	50	49	49
query93	2423	563	555	555
query94	1255	293	301	293
query95	355	261	250	250
query96	615	281	286	281
query97	3238	3073	3162	3073
query98	219	193	195	193
query99	1594	1316	1321	1316
Total cold run time: 302747 ms
Total hot run time: 191242 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.22	0.06	0.06
query4	1.66	0.09	0.09
query5	0.50	0.49	0.51
query6	1.12	0.75	0.74
query7	0.03	0.02	0.02
query8	0.05	0.05	0.05
query9	0.56	0.51	0.48
query10	0.55	0.57	0.55
query11	0.16	0.12	0.12
query12	0.15	0.12	0.13
query13	0.61	0.61	0.60
query14	2.73	2.74	2.84
query15	0.92	0.84	0.83
query16	0.37	0.39	0.39
query17	1.06	1.04	1.05
query18	0.19	0.18	0.18
query19	1.95	1.85	2.04
query20	0.01	0.01	0.01
query21	15.37	0.67	0.66
query22	4.26	8.05	1.32
query23	18.25	1.41	1.24
query24	2.05	0.23	0.23
query25	0.16	0.09	0.09
query26	0.26	0.19	0.18
query27	0.08	0.09	0.07
query28	13.27	1.18	1.14
query29	12.65	3.32	3.30
query30	0.25	0.06	0.06
query31	2.86	0.41	0.41
query32	3.24	0.50	0.48
query33	2.98	3.01	3.01
query34	16.43	4.56	4.50
query35	4.60	4.57	4.58
query36	0.64	0.48	0.47
query37	0.19	0.15	0.15
query38	0.17	0.14	0.16
query39	0.05	0.04	0.04
query40	0.16	0.13	0.12
query41	0.10	0.04	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.05
Total cold run time: 111.1 s
Total hot run time: 32.75 s

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

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

@gavinchou gavinchou added p0_c dev/3.0.x and removed approved Indicates a PR has been approved by one committer. labels Sep 27, 2024
@gavinchou gavinchou merged commit 2bcec14 into apache:master Sep 27, 2024
gavinchou pushed a commit that referenced this pull request Sep 29, 2024
cjj2010 pushed a commit to cjj2010/doris that referenced this pull request Oct 12, 2024
…s backend (apache#40771)

When given a tablet, for multiple frontends, this tablet's backends
maybe different. Because when a tablet's backend shutdown, the frontends
will immedidately change the tablet to a live backend using hash alg.
Because changed no write editlog, so the changed is not aync. It may
result in a tablet relocating to different backends for different
frontends. To fix this problem, each tablet introduces two be id:
primary be id and secondary be id. Only master fe can change primary be
id actively, and it will write an editlog. So it will ensure all
frontends have the same primary be. For a tablet, if its primary be is
alive, then use it as its backend, if its primary be is dead, then can
chose a secondary be as its backend.

More details:
1. when be dead over 1h(Config.rehash_tablet_after_be_dead_seconds),
change none-colocate tablet's primary be id to its secondary be id;
2. don't balance on colocate table, and colocate table don't save their
primary be id;
3. colocate table rehash on "alive be + be dead less
1h(Config.rehash_tablet_after_be_dead_seconds)" sets, but if the gotten
be is dead, change to an alive be. This both ensure availability and
avoid all tablets rehashing when be dead for a short time;
4.  colocate tablet rehash on group id + bucket index;
5.  rehash  prefer to skip the decommission be;
6.  'show backends' will print the right tablet num of each backend;
7.  cloud tablet show PrimaryBackendId
amorynan pushed a commit to amorynan/doris that referenced this pull request Oct 12, 2024
…s backend (apache#40771)

When given a tablet, for multiple frontends, this tablet's backends
maybe different. Because when a tablet's backend shutdown, the frontends
will immedidately change the tablet to a live backend using hash alg.
Because changed no write editlog, so the changed is not aync. It may
result in a tablet relocating to different backends for different
frontends. To fix this problem, each tablet introduces two be id:
primary be id and secondary be id. Only master fe can change primary be
id actively, and it will write an editlog. So it will ensure all
frontends have the same primary be. For a tablet, if its primary be is
alive, then use it as its backend, if its primary be is dead, then can
chose a secondary be as its backend.

More details:
1. when be dead over 1h(Config.rehash_tablet_after_be_dead_seconds),
change none-colocate tablet's primary be id to its secondary be id;
2. don't balance on colocate table, and colocate table don't save their
primary be id;
3. colocate table rehash on "alive be + be dead less
1h(Config.rehash_tablet_after_be_dead_seconds)" sets, but if the gotten
be is dead, change to an alive be. This both ensure availability and
avoid all tablets rehashing when be dead for a short time;
4.  colocate tablet rehash on group id + bucket index;
5.  rehash  prefer to skip the decommission be;
6.  'show backends' will print the right tablet num of each backend;
7.  cloud tablet show PrimaryBackendId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants