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

branch-3.0: [fix](auditlog) add missing audit log fields and duplicate audit log error #43129

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 2, 2024

PR Body: ### What problem does this PR solve?
Problem Summary:

Issue 1

There are some fields that is missing in audit log table.
This PR add them all:

  • shuffle_send_rows
  • shuffle_send_bytes
  • scan_bytes_from_local_storage
  • scan_bytes_from_remote_storage
  • is_nereids
  • compute_group

Notice that compute_group is previously name cloudClusterName in fe.audit.log,
which is incorrect, so I change it to the right name.

After this PR, all these fields will be saved in both audit log table and fe.audit.log

Issue 2

The AuditEventBuilder need to be reset at each run, the there will be duplicate audit log.

Issue 3

Add a new statement call flush_audit_log(). It will flush the audit log immediately to audit_log table.
This is useful in test case, so that we don't need to wait 1min to flush the audit log data.

Check List (For Committer)

  • 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 colde files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes. cloudClusterName in fe.audit.log change to computeGroup. And some fields are added to the audit log table.
  • Does this need documentation?

    • No.
    • Yes. I will add this later
  • Release note

    fix add missing audit log fields and duplicate audit log error

Check List (For Reviewer who merge this PR)

…error (#42262)

### What problem does this PR solve?
Problem Summary:

#### Issue 1
There are some fields that is missing in audit log table.
This PR add them all:
- shuffle_send_rows
- shuffle_send_bytes
- scan_bytes_from_local_storage
- scan_bytes_from_remote_storage
- is_nereids
- compute_group

Notice that `compute_group` is previously name `cloudClusterName` in
fe.audit.log,
which is incorrect, so I change it to the right name.

After this PR, all these fields will be saved in both audit log table
and fe.audit.log

#### Issue 2
The `AuditEventBuilder` need to be reset at each run, the there will be
duplicate audit log.

#### Issue 3
Add a new statement `call flush_audit_log()`. It will flush the audit
log immediately to audit_log table.
This is useful in test case, so that we don't need to wait 1min to flush
the audit log data.

### Release note

[fix](auditlog) add missing audit log fields and duplicate audit log error
Copy link
Contributor Author

github-actions bot commented Nov 2, 2024

run buildall

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

@doris-robot
Copy link

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17582	7343	7247	7247
q2	2043	154	163	154
q3	10709	1042	1152	1042
q4	10553	776	728	728
q5	7749	2783	2745	2745
q6	232	145	144	144
q7	991	611	594	594
q8	9571	1930	1973	1930
q9	7524	6364	6390	6364
q10	7007	2223	2288	2223
q11	469	263	260	260
q12	401	207	206	206
q13	17786	2945	2960	2945
q14	237	229	205	205
q15	618	512	513	512
q16	678	613	607	607
q17	960	539	569	539
q18	7099	6528	6402	6402
q19	2324	1033	1039	1033
q20	473	192	190	190
q21	3797	3209	3148	3148
q22	1088	988	974	974
Total cold run time: 109891 ms
Total hot run time: 40192 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7359	7404	7247	7247
q2	322	234	233	233
q3	2869	2827	2825	2825
q4	2096	1751	1783	1751
q5	5655	5741	5695	5695
q6	225	139	142	139
q7	2144	1769	1746	1746
q8	3292	3515	3530	3515
q9	8726	8818	8783	8783
q10	3524	3471	3488	3471
q11	601	500	492	492
q12	797	603	580	580
q13	16520	3141	3146	3141
q14	317	280	265	265
q15	564	508	508	508
q16	726	670	651	651
q17	1882	1601	1576	1576
q18	8194	7897	7646	7646
q19	1691	1391	1641	1391
q20	2063	1842	1854	1842
q21	5342	5262	5187	5187
q22	1102	1012	1007	1007
Total cold run time: 76011 ms
Total hot run time: 59691 ms

@doris-robot
Copy link

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

query1	1210	933	935	933
query2	6242	2047	1978	1978
query3	10796	3835	3853	3835
query4	67443	26587	23406	23406
query5	5686	450	434	434
query6	455	197	182	182
query7	6206	303	315	303
query8	331	223	216	216
query9	9557	2641	2623	2623
query10	486	253	255	253
query11	18264	15075	15718	15075
query12	164	102	106	102
query13	1580	424	414	414
query14	10974	6427	7159	6427
query15	216	182	184	182
query16	7363	497	464	464
query17	1075	554	557	554
query18	1892	306	298	298
query19	187	151	147	147
query20	110	104	106	104
query21	209	97	103	97
query22	4463	4089	4194	4089
query23	34233	33604	33709	33604
query24	5628	2821	2810	2810
query25	526	411	404	404
query26	690	161	167	161
query27	1694	294	297	294
query28	4156	2515	2473	2473
query29	679	429	423	423
query30	239	153	152	152
query31	988	798	839	798
query32	67	60	55	55
query33	447	280	272	272
query34	884	508	503	503
query35	820	729	721	721
query36	1068	962	950	950
query37	116	72	70	70
query38	3942	3934	3818	3818
query39	1516	1561	1395	1395
query40	199	98	98	98
query41	49	50	50	50
query42	111	94	100	94
query43	526	487	489	487
query44	1096	762	771	762
query45	186	168	166	166
query46	1111	686	724	686
query47	1906	1783	1822	1783
query48	453	381	355	355
query49	750	393	392	392
query50	800	411	409	409
query51	7267	6962	7144	6962
query52	103	89	94	89
query53	250	187	187	187
query54	564	457	462	457
query55	75	76	74	74
query56	259	247	241	241
query57	1172	1091	1105	1091
query58	225	216	206	206
query59	3167	3043	2821	2821
query60	282	242	242	242
query61	104	99	100	99
query62	788	752	654	654
query63	210	196	187	187
query64	1756	616	604	604
query65	3258	3130	3151	3130
query66	717	300	302	300
query67	15699	15300	15308	15300
query68	4604	545	550	545
query69	422	249	248	248
query70	1151	1152	1074	1074
query71	409	255	261	255
query72	6492	3962	3885	3885
query73	738	337	338	337
query74	10230	8992	8899	8899
query75	3351	2678	2607	2607
query76	2704	962	993	962
query77	485	254	254	254
query78	10733	9561	9783	9561
query79	10333	588	583	583
query80	2008	413	417	413
query81	560	245	244	244
query82	1172	131	113	113
query83	306	138	139	138
query84	292	84	74	74
query85	1779	301	280	280
query86	470	299	301	299
query87	4453	4243	4171	4171
query88	5579	2370	2414	2370
query89	515	287	286	286
query90	2008	177	187	177
query91	174	141	156	141
query92	66	49	46	46
query93	6183	538	528	528
query94	869	272	272	272
query95	333	251	253	251
query96	628	279	286	279
query97	3286	3165	3132	3132
query98	222	196	199	196
query99	1629	1301	1289	1289
Total cold run time: 339869 ms
Total hot run time: 192854 ms

@doris-robot
Copy link

run buildall

1 similar comment
@doris-robot
Copy link

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17576	7344	7296	7296
q2	2052	156	149	149
q3	10696	1041	1175	1041
q4	10548	673	713	673
q5	7740	2784	2768	2768
q6	236	146	151	146
q7	969	610	599	599
q8	9341	1897	1966	1897
q9	6556	6434	6364	6364
q10	6954	2273	2316	2273
q11	443	264	255	255
q12	396	206	213	206
q13	17781	2980	2959	2959
q14	239	202	219	202
q15	566	521	522	521
q16	666	611	602	602
q17	946	559	600	559
q18	7323	6521	6617	6521
q19	1381	988	1022	988
q20	484	195	195	195
q21	4193	3152	3185	3152
q22	1117	986	965	965
Total cold run time: 108203 ms
Total hot run time: 40331 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7316	7226	7216	7216
q2	330	238	230	230
q3	3028	2880	2871	2871
q4	2027	1776	1737	1737
q5	5646	5685	5709	5685
q6	222	137	144	137
q7	2175	1741	1754	1741
q8	3358	3440	3513	3440
q9	8678	8783	8776	8776
q10	3524	3482	3518	3482
q11	589	488	504	488
q12	809	586	581	581
q13	14969	3232	3160	3160
q14	311	285	266	266
q15	563	516	517	516
q16	707	681	669	669
q17	1817	1614	1579	1579
q18	8213	7909	7511	7511
q19	1689	1589	1595	1589
q20	2049	1897	1827	1827
q21	5260	5299	5249	5249
q22	1115	1054	1048	1048
Total cold run time: 74395 ms
Total hot run time: 59798 ms

@doris-robot
Copy link

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

query1	1215	914	932	914
query2	6239	2082	2012	2012
query3	10941	4073	3799	3799
query4	67164	29187	23473	23473
query5	5612	419	430	419
query6	440	165	164	164
query7	6079	312	318	312
query8	332	228	231	228
query9	9185	2665	2646	2646
query10	506	253	252	252
query11	17908	15220	15580	15220
query12	155	105	106	105
query13	1597	421	426	421
query14	10700	6694	6389	6389
query15	215	182	176	176
query16	7248	480	496	480
query17	1041	588	544	544
query18	1176	296	291	291
query19	200	151	152	151
query20	115	108	108	108
query21	202	99	105	99
query22	4482	4147	4295	4147
query23	34285	33536	33615	33536
query24	5803	2782	2806	2782
query25	510	396	401	396
query26	681	164	163	163
query27	1699	297	293	293
query28	4311	2502	2486	2486
query29	680	442	420	420
query30	233	159	158	158
query31	1009	786	813	786
query32	63	54	53	53
query33	452	268	271	268
query34	879	490	511	490
query35	822	733	718	718
query36	1077	928	909	909
query37	116	72	77	72
query38	3893	3800	3808	3800
query39	1502	1418	1439	1418
query40	195	96	95	95
query41	52	47	48	47
query42	108	95	98	95
query43	524	504	492	492
query44	1126	778	779	778
query45	190	162	165	162
query46	1099	706	698	698
query47	1937	1837	1804	1804
query48	451	373	367	367
query49	741	389	384	384
query50	808	408	406	406
query51	7158	7054	6956	6956
query52	99	89	93	89
query53	260	184	183	183
query54	567	463	445	445
query55	76	75	78	75
query56	254	243	259	243
query57	1149	1073	1079	1073
query58	206	196	199	196
query59	3029	2973	2860	2860
query60	278	258	246	246
query61	101	100	97	97
query62	769	660	655	655
query63	206	191	192	191
query64	1458	625	574	574
query65	3241	3175	3145	3145
query66	667	291	304	291
query67	15794	15414	15385	15385
query68	4667	542	562	542
query69	424	246	250	246
query70	1083	1093	1140	1093
query71	376	266	260	260
query72	6372	4026	3906	3906
query73	749	335	332	332
query74	9704	8794	8819	8794
query75	3317	2599	2566	2566
query76	1963	969	899	899
query77	524	253	258	253
query78	10689	9589	9586	9586
query79	8410	594	583	583
query80	2252	403	416	403
query81	549	242	241	241
query82	1378	109	111	109
query83	253	137	132	132
query84	283	76	75	75
query85	1908	294	276	276
query86	494	292	309	292
query87	4500	4185	4269	4185
query88	5419	2361	2370	2361
query89	561	282	285	282
query90	2094	180	184	180
query91	171	141	138	138
query92	66	47	45	45
query93	6520	534	537	534
query94	965	276	300	276
query95	350	244	260	244
query96	619	274	288	274
query97	3358	3147	3110	3110
query98	228	195	199	195
query99	1755	1286	1304	1286
Total cold run time: 335311 ms
Total hot run time: 192828 ms

@dataroaring dataroaring closed this Nov 7, 2024
@dataroaring dataroaring deleted the auto-pick-42262-branch-3.0 branch December 27, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants