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

[enhance](auth)The priority of attributes is higher than session variable #47185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zddr
Copy link
Contributor

@zddr zddr commented Jan 17, 2025

What problem does this PR solve?

The current priority is that session variable is higher than user property, which is incorrect because session variable can be set freely by ordinary users and will bypass the restrictions set by administrators

Scope of Impact:

  • getInsertTimeoutS
  • getQueryTimeoutS
  • getMaxExecMemByte
  • getWorkloadGroup

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Jan 17, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zddr
Copy link
Contributor Author

zddr commented Jan 17, 2025

run buildall

@morrySnow morrySnow added the usercase Important user case type label label Jan 17, 2025
Copy link
Contributor

@morrySnow morrySnow left a comment

Choose a reason for hiding this comment

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

add test cases

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17588	5448	5354	5354
q2	2045	302	189	189
q3	10408	1267	724	724
q4	10222	974	542	542
q5	7540	2406	2152	2152
q6	195	171	141	141
q7	924	755	604	604
q8	9235	1381	1217	1217
q9	5388	4991	4886	4886
q10	6839	2326	1886	1886
q11	472	281	281	281
q12	345	351	222	222
q13	17773	3691	3135	3135
q14	232	242	207	207
q15	515	473	471	471
q16	619	634	591	591
q17	556	854	335	335
q18	6997	6450	6294	6294
q19	1220	953	521	521
q20	327	336	191	191
q21	2881	2282	1987	1987
q22	372	339	315	315
Total cold run time: 102693 ms
Total hot run time: 32245 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5488	5495	5459	5459
q2	240	331	238	238
q3	2275	2644	2288	2288
q4	1437	1796	1379	1379
q5	4375	4735	4672	4672
q6	160	156	124	124
q7	2044	1966	1797	1797
q8	2680	2824	2669	2669
q9	7312	7213	7259	7213
q10	2993	3239	2772	2772
q11	592	523	521	521
q12	713	770	663	663
q13	3470	3869	3232	3232
q14	275	311	282	282
q15	515	478	457	457
q16	647	688	661	661
q17	1236	1721	1286	1286
q18	7628	7421	7424	7421
q19	789	1172	1090	1090
q20	2005	2003	1910	1910
q21	5742	5268	4870	4870
q22	600	612	525	525
Total cold run time: 53216 ms
Total hot run time: 51529 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186522 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 359fa20ef11c20bcce6e03698b6b3235cd2f6a4d, data reload: false

query1	977	379	362	362
query2	6549	2104	2112	2104
query3	6793	219	214	214
query4	33423	23142	22814	22814
query5	4353	624	456	456
query6	267	195	173	173
query7	4613	489	291	291
query8	287	229	232	229
query9	9529	2571	2554	2554
query10	466	302	234	234
query11	18183	15300	15004	15004
query12	155	108	101	101
query13	1640	498	375	375
query14	9856	6795	6751	6751
query15	217	205	191	191
query16	7873	635	463	463
query17	1613	751	563	563
query18	2019	406	302	302
query19	228	186	164	164
query20	120	115	108	108
query21	220	125	105	105
query22	4432	4303	4347	4303
query23	34132	33462	32689	32689
query24	6881	2300	2275	2275
query25	484	450	368	368
query26	1210	271	154	154
query27	2058	494	326	326
query28	5349	2421	2378	2378
query29	695	546	411	411
query30	233	181	155	155
query31	965	838	792	792
query32	76	58	64	58
query33	512	364	331	331
query34	733	865	482	482
query35	817	829	748	748
query36	991	1025	928	928
query37	117	101	80	80
query38	4287	4090	4045	4045
query39	1502	1384	1443	1384
query40	203	114	99	99
query41	78	56	56	56
query42	116	98	101	98
query43	520	528	501	501
query44	1301	799	790	790
query45	181	176	164	164
query46	839	1036	636	636
query47	1811	1856	1791	1791
query48	380	393	327	327
query49	784	488	385	385
query50	631	661	397	397
query51	6874	6948	6791	6791
query52	99	106	93	93
query53	222	246	183	183
query54	488	505	399	399
query55	88	82	85	82
query56	261	260	236	236
query57	1165	1135	1076	1076
query58	257	239	237	237
query59	2999	3105	2883	2883
query60	280	288	245	245
query61	118	116	116	116
query62	817	705	669	669
query63	226	194	186	186
query64	4419	1004	644	644
query65	3244	3156	3176	3156
query66	1076	414	304	304
query67	15988	15655	15342	15342
query68	5366	819	518	518
query69	476	282	258	258
query70	1213	1196	1116	1116
query71	378	283	250	250
query72	5759	3827	3768	3768
query73	641	739	352	352
query74	10358	8935	8839	8839
query75	3189	3073	2665	2665
query76	3178	1174	767	767
query77	466	350	275	275
query78	9986	9977	9348	9348
query79	3077	797	589	589
query80	682	543	450	450
query81	504	279	239	239
query82	392	145	121	121
query83	188	175	149	149
query84	243	88	71	71
query85	776	340	305	305
query86	391	320	302	302
query87	4416	4443	4419	4419
query88	4915	2129	2161	2129
query89	384	326	307	307
query90	1873	189	195	189
query91	139	139	106	106
query92	67	56	51	51
query93	2348	877	538	538
query94	672	404	307	307
query95	331	277	250	250
query96	483	615	280	280
query97	2753	2857	2771	2771
query98	226	211	202	202
query99	1268	1404	1240	1240
Total cold run time: 287458 ms
Total hot run time: 186522 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.07
query4	1.63	0.11	0.10
query5	0.42	0.44	0.42
query6	1.16	0.65	0.64
query7	0.03	0.02	0.01
query8	0.04	0.03	0.03
query9	0.60	0.51	0.50
query10	0.55	0.57	0.56
query11	0.14	0.10	0.10
query12	0.14	0.11	0.10
query13	0.61	0.60	0.59
query14	2.69	2.88	2.72
query15	0.89	0.82	0.82
query16	0.40	0.39	0.39
query17	1.04	0.96	1.08
query18	0.24	0.21	0.21
query19	1.98	1.85	2.00
query20	0.02	0.01	0.01
query21	15.35	0.96	0.57
query22	0.76	0.77	0.64
query23	15.39	1.44	0.54
query24	2.54	0.36	1.37
query25	0.21	0.13	0.12
query26	0.38	0.16	0.13
query27	0.06	0.04	0.04
query28	13.32	1.04	0.43
query29	12.59	3.97	3.28
query30	0.26	0.09	0.06
query31	2.85	0.59	0.40
query32	3.22	0.55	0.46
query33	2.98	2.95	3.02
query34	16.62	5.12	4.43
query35	4.52	4.51	4.48
query36	0.61	0.49	0.50
query37	0.10	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.17	0.13	0.12
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.09 s
Total hot run time: 29.83 s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants