Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[fix](auth)fix fe can not restart when replay create row policy log #37342

Merged
merged 5 commits into from
Jul 9, 2024

Conversation

zddr
Copy link
Contributor

@zddr zddr commented Jul 5, 2024

When executing two SQL statements simultaneously,such as

DROP ROW POLICY IF EXISTS test_row_policy_3 on zd.user1;CREATE ROW POLICY test_row_policy_3 ON zd.user1 AS RESTRICTIVE TO role role1 USING (k1 in (1) or k2 in (2));

fe will can not restart

Caused by: java.lang.ClassCastException: org.apache.doris.analysis.DropPolicyStmt cannot be cast to org.apache.doris.analysis.CreatePolicyStmt
	at org.apache.doris.policy.RowPolicy.gsonPostProcess(RowPolicy.java:169) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.persist.gson.GsonUtils$PostProcessTypeAdapterFactory$1.read(GsonUtils.java:640) ~[doris-fe.jar:1.2-SNAPSHOT]
	at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:299) ~[gson-2.10.1.jar:?]
	... 14 more

fix:

  • setOrigStmt use split sql instead of full sql
  • store index to cope with segmentation failure

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

@zddr zddr changed the title [fix](auth)fix fe [fix](auth)fix fe can not restart when replay create row policy log Jul 5, 2024
@zddr
Copy link
Contributor Author

zddr commented Jul 5, 2024

run buildall

@wm1581066 wm1581066 added the usercase Important user case type label label Jul 5, 2024
@wm1581066 wm1581066 requested review from morrySnow and 924060929 July 5, 2024 07:50
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18191	4435	4383	4383
q2	2519	199	201	199
q3	11065	1201	1081	1081
q4	10857	813	791	791
q5	7758	2682	2667	2667
q6	226	144	141	141
q7	968	616	633	616
q8	9598	2044	2060	2044
q9	8765	6470	6472	6470
q10	8816	3696	3651	3651
q11	497	243	249	243
q12	395	248	236	236
q13	18839	2987	2997	2987
q14	268	230	226	226
q15	535	487	495	487
q16	521	373	380	373
q17	964	661	746	661
q18	8134	7406	7349	7349
q19	7325	1475	1308	1308
q20	702	324	324	324
q21	4976	3166	3872	3166
q22	406	344	344	344
Total cold run time: 122325 ms
Total hot run time: 39747 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4398	4251	4221	4221
q2	396	271	273	271
q3	2952	2777	2721	2721
q4	1834	1599	1581	1581
q5	5256	5264	5386	5264
q6	217	130	130	130
q7	2076	1771	1769	1769
q8	3201	3317	3307	3307
q9	8341	8348	8366	8348
q10	3851	3611	3602	3602
q11	575	503	500	500
q12	756	610	613	610
q13	17396	2984	2978	2978
q14	291	273	261	261
q15	504	471	476	471
q16	473	409	424	409
q17	1768	1493	1461	1461
q18	7645	7495	7393	7393
q19	1687	1693	1551	1551
q20	1971	1798	1765	1765
q21	10141	4773	4652	4652
q22	618	552	579	552
Total cold run time: 76347 ms
Total hot run time: 53817 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172719 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 82407cf3fa8eaf7a96348736b8f81524803d3bdd, data reload: false

query1	907	369	386	369
query2	6487	2582	2534	2534
query3	6644	201	209	201
query4	28641	17404	17289	17289
query5	4214	475	477	475
query6	268	162	171	162
query7	4590	299	293	293
query8	322	305	294	294
query9	8574	2464	2434	2434
query10	618	307	280	280
query11	10970	9950	10019	9950
query12	147	86	86	86
query13	1659	372	377	372
query14	10401	7617	8279	7617
query15	235	183	184	183
query16	7256	328	313	313
query17	1801	588	544	544
query18	1189	283	284	283
query19	199	153	157	153
query20	93	82	83	82
query21	218	140	139	139
query22	4165	4063	4001	4001
query23	33698	32933	33204	32933
query24	12044	2910	2838	2838
query25	671	389	387	387
query26	1679	156	160	156
query27	2600	337	337	337
query28	7090	2127	2089	2089
query29	996	643	633	633
query30	290	151	147	147
query31	954	724	741	724
query32	98	54	55	54
query33	794	316	315	315
query34	921	497	501	497
query35	736	609	613	609
query36	1110	951	950	950
query37	154	78	79	78
query38	2882	2716	2722	2716
query39	876	814	805	805
query40	278	127	126	126
query41	56	54	53	53
query42	121	95	103	95
query43	616	602	565	565
query44	1238	723	727	723
query45	190	167	164	164
query46	1076	719	699	699
query47	1829	1750	1762	1750
query48	372	302	293	293
query49	1202	420	425	420
query50	776	400	398	398
query51	6931	6719	6615	6615
query52	108	95	99	95
query53	356	297	292	292
query54	1120	479	465	465
query55	76	76	76	76
query56	327	291	292	291
query57	1130	1046	1169	1046
query58	260	251	247	247
query59	3467	3320	3188	3188
query60	322	276	273	273
query61	97	107	96	96
query62	653	450	447	447
query63	326	290	295	290
query64	9941	2300	1745	1745
query65	3175	3113	3136	3113
query66	1271	340	345	340
query67	15697	14815	14773	14773
query68	8587	545	556	545
query69	776	431	368	368
query70	1109	1116	1104	1104
query71	530	278	276	276
query72	8620	5218	5324	5218
query73	838	327	326	326
query74	5879	5477	5582	5477
query75	5188	2634	2666	2634
query76	5002	972	882	882
query77	794	296	297	296
query78	9698	9028	8824	8824
query79	8758	513	517	513
query80	1125	492	486	486
query81	576	216	226	216
query82	786	114	103	103
query83	353	170	168	168
query84	279	85	133	85
query85	1397	315	292	292
query86	395	331	304	304
query87	3365	3195	3174	3174
query88	5227	2445	2442	2442
query89	542	380	380	380
query90	2146	187	186	186
query91	130	102	103	102
query92	61	50	49	49
query93	6806	514	504	504
query94	1384	205	207	205
query95	408	312	322	312
query96	616	313	270	270
query97	3186	2946	3002	2946
query98	222	203	257	203
query99	1205	853	829	829
Total cold run time: 306190 ms
Total hot run time: 172719 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.05	0.04
query3	0.22	0.05	0.05
query4	1.68	0.11	0.08
query5	0.51	0.49	0.48
query6	1.16	0.73	0.71
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.55	0.50	0.50
query10	0.53	0.55	0.54
query11	0.16	0.11	0.11
query12	0.15	0.13	0.13
query13	0.59	0.58	0.58
query14	0.76	0.78	0.76
query15	0.86	0.82	0.82
query16	0.37	0.37	0.36
query17	1.02	0.96	1.02
query18	0.22	0.25	0.23
query19	1.87	1.68	1.73
query20	0.02	0.01	0.01
query21	15.45	0.77	0.64
query22	4.10	7.51	1.95
query23	18.28	1.42	1.27
query24	2.09	0.22	0.22
query25	0.16	0.08	0.08
query26	0.29	0.20	0.20
query27	0.46	0.23	0.23
query28	13.29	1.02	1.00
query29	12.59	3.36	3.34
query30	0.25	0.05	0.05
query31	2.88	0.39	0.38
query32	3.27	0.48	0.47
query33	2.92	2.94	2.94
query34	17.04	4.35	4.34
query35	4.43	4.37	4.38
query36	0.66	0.48	0.47
query37	0.19	0.15	0.15
query38	0.15	0.15	0.15
query39	0.04	0.03	0.04
query40	0.15	0.13	0.13
query41	0.09	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.75 s
Total hot run time: 30.67 s

@@ -102,6 +102,8 @@ public class RowPolicy extends Policy implements RowFilterPolicy {
**/
@SerializedName(value = "originStmt")
private String originStmt;
@SerializedName(value = "stmtIdx")
private int stmtIdx;
Copy link
Contributor

Choose a reason for hiding this comment

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

what will stmtIdx be when do deserialization if no stmtIdx in json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will be default 0,we only support stmtIdx is 0

@@ -218,7 +225,7 @@ public boolean isInvalid() {
public Expression getFilterExpression() throws AnalysisException {
NereidsParser nereidsParser = new NereidsParser();
String sql = getOriginStmt();
CreatePolicyCommand command = (CreatePolicyCommand) nereidsParser.parseSingle(sql);
CreatePolicyCommand command = (CreatePolicyCommand) nereidsParser.parseMultiple(sql).get(stmtIdx).first;
Copy link
Contributor

Choose a reason for hiding this comment

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

check out of bound error?

@zddr
Copy link
Contributor Author

zddr commented Jul 5, 2024

run buildall

@zddr
Copy link
Contributor Author

zddr commented Jul 8, 2024

run performance

@zddr zddr requested a review from morrySnow July 8, 2024 02:02
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17609	4333	4254	4254
q2	2013	189	185	185
q3	10466	1203	1027	1027
q4	10198	750	750	750
q5	7480	2638	2565	2565
q6	216	133	135	133
q7	945	598	604	598
q8	9218	2061	2044	2044
q9	9061	6490	6433	6433
q10	8992	3752	3708	3708
q11	485	239	233	233
q12	477	231	226	226
q13	18042	3018	3019	3018
q14	260	232	246	232
q15	537	489	492	489
q16	524	377	366	366
q17	983	676	687	676
q18	7917	7513	7512	7512
q19	8771	1500	1532	1500
q20	664	328	322	322
q21	4915	3906	3213	3213
q22	389	342	334	334
Total cold run time: 120162 ms
Total hot run time: 39818 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4481	4305	4271	4271
q2	386	267	263	263
q3	3170	2985	2988	2985
q4	1968	1777	1759	1759
q5	5553	5604	5615	5604
q6	245	145	133	133
q7	2357	1971	1969	1969
q8	3370	3498	3462	3462
q9	8983	9164	8995	8995
q10	4188	3754	3873	3754
q11	632	521	501	501
q12	813	671	621	621
q13	16787	3170	3162	3162
q14	305	284	275	275
q15	555	486	502	486
q16	584	433	446	433
q17	1808	1527	1508	1508
q18	8034	7968	7827	7827
q19	1805	1595	1577	1577
q20	2136	1852	1876	1852
q21	7017	4985	4872	4872
q22	643	564	570	564
Total cold run time: 75820 ms
Total hot run time: 56873 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173737 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 278fed95ed44a9e6723173ac658eb71070e7410f, data reload: false

query1	923	374	374	374
query2	6457	2555	2527	2527
query3	6636	208	225	208
query4	28233	17416	17102	17102
query5	3599	496	481	481
query6	291	175	164	164
query7	4592	306	296	296
query8	315	307	295	295
query9	8540	2360	2345	2345
query10	577	324	286	286
query11	11738	10019	10079	10019
query12	123	80	86	80
query13	1648	378	371	371
query14	10151	7879	7536	7536
query15	234	187	185	185
query16	7856	328	304	304
query17	1789	552	535	535
query18	2023	273	273	273
query19	188	150	143	143
query20	90	78	81	78
query21	211	136	125	125
query22	4192	4153	4049	4049
query23	34038	33715	33625	33625
query24	10792	2973	2857	2857
query25	586	383	419	383
query26	732	160	152	152
query27	2226	317	323	317
query28	5792	2127	2120	2120
query29	903	641	639	639
query30	254	152	150	150
query31	965	755	755	755
query32	98	52	60	52
query33	657	355	301	301
query34	888	503	506	503
query35	733	629	640	629
query36	1159	999	982	982
query37	138	80	80	80
query38	2987	2828	2871	2828
query39	922	817	809	809
query40	199	124	126	124
query41	53	52	51	51
query42	115	100	104	100
query43	607	565	569	565
query44	1087	727	727	727
query45	193	160	164	160
query46	1077	720	716	716
query47	1861	1755	1752	1752
query48	367	293	307	293
query49	833	432	429	429
query50	794	389	395	389
query51	6865	6820	6837	6820
query52	108	94	91	91
query53	355	299	294	294
query54	885	462	460	460
query55	78	73	74	73
query56	298	284	281	281
query57	1128	1035	1039	1035
query58	268	272	259	259
query59	3571	3447	3141	3141
query60	320	297	341	297
query61	101	96	96	96
query62	617	444	445	444
query63	326	303	290	290
query64	9151	2177	1631	1631
query65	3160	3108	3134	3108
query66	774	327	334	327
query67	15375	15073	14821	14821
query68	4591	526	530	526
query69	502	341	347	341
query70	1160	1073	1166	1073
query71	380	276	276	276
query72	7893	5365	5502	5365
query73	742	323	325	323
query74	5916	5477	5413	5413
query75	3445	2693	2713	2693
query76	2445	940	944	940
query77	706	306	299	299
query78	9595	9321	9007	9007
query79	2372	505	522	505
query80	1368	478	462	462
query81	587	214	218	214
query82	840	104	103	103
query83	336	163	166	163
query84	272	87	89	87
query85	2008	326	303	303
query86	475	317	330	317
query87	3284	3108	3075	3075
query88	4469	2440	2457	2440
query89	500	383	382	382
query90	1785	192	187	187
query91	132	176	104	104
query92	62	53	47	47
query93	2388	505	512	505
query94	1162	214	213	213
query95	417	323	319	319
query96	595	271	273	271
query97	3154	3044	3025	3025
query98	228	210	200	200
query99	1174	883	827	827
Total cold run time: 279825 ms
Total hot run time: 173737 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.03
query3	0.23	0.05	0.06
query4	1.67	0.09	0.09
query5	0.50	0.48	0.47
query6	1.14	0.73	0.73
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.55	0.50	0.49
query10	0.55	0.55	0.54
query11	0.15	0.12	0.11
query12	0.15	0.12	0.13
query13	0.58	0.59	0.58
query14	0.78	0.77	0.78
query15	0.84	0.80	0.82
query16	0.36	0.37	0.38
query17	0.94	0.97	1.01
query18	0.22	0.23	0.25
query19	1.83	1.71	1.72
query20	0.01	0.00	0.00
query21	15.40	0.77	0.66
query22	4.66	7.31	1.61
query23	18.32	1.46	1.36
query24	2.13	0.23	0.22
query25	0.16	0.08	0.09
query26	0.28	0.20	0.21
query27	0.46	0.23	0.23
query28	13.23	1.02	0.99
query29	12.62	3.28	3.26
query30	0.25	0.05	0.06
query31	2.86	0.38	0.38
query32	3.30	0.48	0.48
query33	2.87	2.90	2.90
query34	17.15	4.39	4.31
query35	4.37	4.46	4.43
query36	0.65	0.46	0.47
query37	0.18	0.15	0.17
query38	0.15	0.14	0.14
query39	0.04	0.03	0.04
query40	0.15	0.12	0.12
query41	0.09	0.05	0.04
query42	0.06	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 110.11 s
Total hot run time: 30.33 s

@zddr
Copy link
Contributor Author

zddr commented Jul 8, 2024

run buildall

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

github-actions bot commented Jul 8, 2024

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

Copy link
Contributor

github-actions bot commented Jul 8, 2024

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17616	4690	4278	4278
q2	2023	192	201	192
q3	10432	1186	1096	1096
q4	10199	721	787	721
q5	7513	2597	2642	2597
q6	219	139	139	139
q7	957	602	611	602
q8	9221	2041	2063	2041
q9	8891	6491	6451	6451
q10	9015	3732	3722	3722
q11	444	239	239	239
q12	492	229	235	229
q13	17885	2984	2987	2984
q14	260	231	232	231
q15	540	487	489	487
q16	531	384	380	380
q17	954	645	757	645
q18	7958	7512	7372	7372
q19	5385	1517	1263	1263
q20	694	331	334	331
q21	4854	3910	3179	3179
q22	398	345	353	345
Total cold run time: 116481 ms
Total hot run time: 39524 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4348	4305	4290	4290
q2	367	265	275	265
q3	2982	2828	2876	2828
q4	2010	1667	1660	1660
q5	5638	5539	5458	5458
q6	227	139	143	139
q7	2141	1840	1846	1840
q8	3300	3410	3400	3400
q9	8676	8666	8812	8666
q10	4064	3882	3739	3739
q11	575	500	474	474
q12	820	649	636	636
q13	17231	3187	3159	3159
q14	332	280	271	271
q15	539	482	511	482
q16	497	444	465	444
q17	1862	1520	1501	1501
q18	8106	7971	7706	7706
q19	1738	1492	1707	1492
q20	2147	1869	1863	1863
q21	5083	4938	4912	4912
q22	619	538	546	538
Total cold run time: 73302 ms
Total hot run time: 55763 ms

@doris-robot
Copy link

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

query1	911	391	370	370
query2	6451	2503	2236	2236
query3	6640	203	219	203
query4	27573	17553	17409	17409
query5	3670	489	491	489
query6	270	174	166	166
query7	4586	321	300	300
query8	334	297	290	290
query9	8729	2403	2382	2382
query10	568	294	291	291
query11	10699	10083	9875	9875
query12	117	81	87	81
query13	1634	384	376	376
query14	10135	7567	7786	7567
query15	232	183	187	183
query16	7687	293	309	293
query17	1845	559	533	533
query18	1852	280	272	272
query19	198	148	151	148
query20	89	86	79	79
query21	204	125	124	124
query22	4302	4122	4114	4114
query23	33942	33715	34490	33715
query24	11162	2873	2872	2872
query25	508	368	379	368
query26	699	160	152	152
query27	2303	326	328	326
query28	6529	2172	2165	2165
query29	895	642	674	642
query30	266	152	153	152
query31	995	747	741	741
query32	93	53	52	52
query33	754	306	347	306
query34	924	502	498	498
query35	744	611	652	611
query36	1122	1014	988	988
query37	147	87	88	87
query38	3014	2893	2797	2797
query39	893	785	793	785
query40	210	124	129	124
query41	52	51	54	51
query42	114	99	102	99
query43	589	542	538	538
query44	1166	739	750	739
query45	197	162	158	158
query46	1082	755	713	713
query47	1840	1751	1768	1751
query48	406	299	308	299
query49	837	405	418	405
query50	765	399	390	390
query51	6881	6777	6739	6739
query52	102	94	98	94
query53	364	292	292	292
query54	894	462	499	462
query55	76	73	72	72
query56	289	258	269	258
query57	1141	1061	1036	1036
query58	250	250	248	248
query59	3507	3245	2970	2970
query60	297	271	275	271
query61	97	94	94	94
query62	616	439	438	438
query63	315	288	297	288
query64	9145	2208	1982	1982
query65	3166	3068	3107	3068
query66	745	318	335	318
query67	15445	15185	15011	15011
query68	6158	565	571	565
query69	645	435	356	356
query70	1191	1092	1088	1088
query71	489	284	280	280
query72	7236	5440	4880	4880
query73	770	325	326	325
query74	5834	5562	5535	5535
query75	3906	2702	2688	2688
query76	4212	929	895	895
query77	699	299	306	299
query78	9436	8932	8894	8894
query79	2164	530	542	530
query80	1479	472	468	468
query81	569	216	217	216
query82	731	113	107	107
query83	200	171	171	171
query84	280	87	89	87
query85	1247	379	300	300
query86	407	331	309	309
query87	3289	3102	3104	3102
query88	3859	2472	2451	2451
query89	481	399	391	391
query90	1853	194	189	189
query91	134	101	104	101
query92	57	49	50	49
query93	4123	525	519	519
query94	1014	210	213	210
query95	403	314	316	314
query96	603	272	273	272
query97	3178	2985	3003	2985
query98	214	193	193	193
query99	1312	834	830	830
Total cold run time: 282477 ms
Total hot run time: 173545 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
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.48
query6	1.14	0.72	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.55	0.49	0.50
query10	0.55	0.55	0.55
query11	0.15	0.11	0.11
query12	0.14	0.12	0.13
query13	0.59	0.58	0.58
query14	0.75	0.75	0.79
query15	0.85	0.82	0.81
query16	0.37	0.36	0.35
query17	1.00	0.95	0.97
query18	0.20	0.29	0.23
query19	1.76	1.78	1.69
query20	0.02	0.01	0.00
query21	15.46	0.75	0.66
query22	3.57	6.48	2.65
query23	18.33	1.41	1.31
query24	2.08	0.22	0.23
query25	0.15	0.09	0.09
query26	0.29	0.20	0.22
query27	0.45	0.22	0.23
query28	13.32	1.01	1.00
query29	12.63	3.30	3.27
query30	0.27	0.06	0.05
query31	2.89	0.38	0.37
query32	3.27	0.46	0.47
query33	2.85	2.90	2.95
query34	16.99	4.33	4.34
query35	4.45	4.41	4.40
query36	0.66	0.46	0.48
query37	0.19	0.15	0.15
query38	0.16	0.15	0.14
query39	0.04	0.04	0.03
query40	0.15	0.13	0.12
query41	0.10	0.05	0.05
query42	0.06	0.04	0.04
query43	0.04	0.04	0.04
Total cold run time: 109.04 s
Total hot run time: 31.26 s

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman merged commit 82dc814 into apache:master Jul 9, 2024
26 of 29 checks passed
dataroaring pushed a commit that referenced this pull request Jul 9, 2024
…37342)

When executing two SQL statements simultaneously,such as
```
DROP ROW POLICY IF EXISTS test_row_policy_3 on zd.user1;CREATE ROW POLICY test_row_policy_3 ON zd.user1 AS RESTRICTIVE TO role role1 USING (k1 in (1) or k2 in (2));
```
fe will can not restart
```
Caused by: java.lang.ClassCastException: org.apache.doris.analysis.DropPolicyStmt cannot be cast to org.apache.doris.analysis.CreatePolicyStmt
	at org.apache.doris.policy.RowPolicy.gsonPostProcess(RowPolicy.java:169) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.persist.gson.GsonUtils$PostProcessTypeAdapterFactory$1.read(GsonUtils.java:640) ~[doris-fe.jar:1.2-SNAPSHOT]
	at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:299) ~[gson-2.10.1.jar:?]
	... 14 more
```
fix:
- setOrigStmt use split sql instead of full sql
- store index to cope with segmentation failure
zddr added a commit to zddr/incubator-doris that referenced this pull request Jul 15, 2024
…pache#37342)

When executing two SQL statements simultaneously,such as
```
DROP ROW POLICY IF EXISTS test_row_policy_3 on zd.user1;CREATE ROW POLICY test_row_policy_3 ON zd.user1 AS RESTRICTIVE TO role role1 USING (k1 in (1) or k2 in (2));
```
fe will can not restart
```
Caused by: java.lang.ClassCastException: org.apache.doris.analysis.DropPolicyStmt cannot be cast to org.apache.doris.analysis.CreatePolicyStmt
	at org.apache.doris.policy.RowPolicy.gsonPostProcess(RowPolicy.java:169) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.persist.gson.GsonUtils$PostProcessTypeAdapterFactory$1.read(GsonUtils.java:640) ~[doris-fe.jar:1.2-SNAPSHOT]
	at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:299) ~[gson-2.10.1.jar:?]
	... 14 more
```
fix:
- setOrigStmt use split sql instead of full sql
- store index to cope with segmentation failure
@yiguolei yiguolei mentioned this pull request Jul 19, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.13-merged dev/2.1.5-merged dev/3.0.0-merged reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants