Skip to content

[fix](export) fix potential export concurrency issue#43109

Merged
CalvinKirs merged 1 commit intoapache:masterfrom
morningman:export_concurrent
Nov 2, 2024
Merged

[fix](export) fix potential export concurrency issue#43109
CalvinKirs merged 1 commit intoapache:masterfrom
morningman:export_concurrent

Conversation

@morningman
Copy link
Contributor

@morningman morningman commented Nov 1, 2024

What problem does this PR solve?

Problem Summary:

2024-11-01 19:42:52,521 WARN (mysql-nio-pool-117|9514) [StmtExecutor.execute():616] Analyze failed. stmt[250257, 59c581a512e7468f-b1cfd7d4b63fed33]
org.apache.doris.common.NereidsException: errCode = 2, detailMessage = java.util.ConcurrentModificationException
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:780) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:601) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:564) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:554) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:340) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:243) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:208) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:236) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:413) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = java.util.ConcurrentModificationException
        ... 13 more
Caused by: java.util.ConcurrentModificationException
        at java.util.ArrayList.forEach(ArrayList.java:1513) ~[?:?]
        at org.apache.doris.load.ExportMgr.addExportJobAndRegisterTask(ExportMgr.java:120) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ExportCommand.run(ExportCommand.java:149) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:749) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more

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.
  • Does this need documentation?

    • No.
    • Yes.
  • Release note

    None

Check List (For Reviewer who merge this PR)

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

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

@morningman
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17557	7445	7304	7304
q2	2041	169	159	159
q3	10610	1100	1184	1100
q4	10581	813	813	813
q5	7789	3065	3079	3065
q6	236	149	145	145
q7	1029	612	608	608
q8	9352	1947	2008	1947
q9	6563	6422	6444	6422
q10	7053	2371	2405	2371
q11	460	260	256	256
q12	419	214	213	213
q13	17773	3008	3023	3008
q14	253	207	208	207
q15	561	524	493	493
q16	641	576	573	573
q17	962	627	561	561
q18	7279	6711	6797	6711
q19	1337	1031	1059	1031
q20	480	183	183	183
q21	4087	3285	3251	3251
q22	1097	1029	1020	1020
Total cold run time: 108160 ms
Total hot run time: 41441 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7253	7282	7300	7282
q2	320	223	228	223
q3	3003	2942	2951	2942
q4	2097	1933	1750	1750
q5	5729	5779	5811	5779
q6	227	139	139	139
q7	2266	1836	1788	1788
q8	3409	3530	3496	3496
q9	8913	8878	8836	8836
q10	3620	3538	3577	3538
q11	636	509	508	508
q12	808	639	634	634
q13	8491	3160	3219	3160
q14	304	275	290	275
q15	576	531	532	531
q16	684	675	650	650
q17	1829	1652	1607	1607
q18	8321	7885	7573	7573
q19	1699	1672	1648	1648
q20	2102	1874	1890	1874
q21	5637	5451	5596	5451
q22	1129	1070	1046	1046
Total cold run time: 69053 ms
Total hot run time: 60730 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 196008 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 9c84473091fc70d1f67d3501e21a7f4d37dc302f, data reload: false

query1	1213	933	897	897
query2	6234	2198	2127	2127
query3	10806	4135	4008	4008
query4	67901	27665	23699	23699
query5	4881	444	435	435
query6	398	183	165	165
query7	5591	305	296	296
query8	313	226	227	226
query9	8947	2724	2723	2723
query10	463	253	249	249
query11	17359	15271	15998	15271
query12	157	98	107	98
query13	1567	425	417	417
query14	10322	7180	7613	7180
query15	210	182	189	182
query16	7143	483	489	483
query17	1042	548	557	548
query18	1764	306	294	294
query19	191	159	145	145
query20	118	112	112	112
query21	196	98	100	98
query22	4663	4291	4455	4291
query23	34508	33945	34440	33945
query24	6011	2780	2785	2780
query25	519	393	405	393
query26	654	156	157	156
query27	1670	278	284	278
query28	4116	2429	2408	2408
query29	683	429	415	415
query30	230	157	155	155
query31	986	783	815	783
query32	62	56	58	56
query33	401	260	269	260
query34	894	514	501	501
query35	860	741	751	741
query36	1085	961	958	958
query37	119	79	70	70
query38	4363	4215	4260	4215
query39	1512	1444	1415	1415
query40	203	99	101	99
query41	47	45	45	45
query42	110	101	98	98
query43	550	506	512	506
query44	1158	814	812	812
query45	185	166	172	166
query46	1108	699	699	699
query47	1954	1854	1842	1842
query48	426	313	321	313
query49	748	391	415	391
query50	806	395	391	391
query51	7341	7111	7115	7111
query52	98	87	83	83
query53	247	176	183	176
query54	505	387	383	383
query55	77	78	74	74
query56	248	225	223	223
query57	1277	1174	1147	1147
query58	217	201	202	201
query59	3378	3075	2967	2967
query60	274	239	234	234
query61	104	97	100	97
query62	784	677	677	677
query63	212	186	177	177
query64	1327	654	610	610
query65	3295	3212	3305	3212
query66	695	306	301	301
query67	15987	15619	15765	15619
query68	3756	561	563	561
query69	416	251	254	251
query70	1171	1158	1077	1077
query71	352	251	248	248
query72	6232	4011	4044	4011
query73	755	350	358	350
query74	10027	9247	9026	9026
query75	3396	2673	2650	2650
query76	1809	1078	1037	1037
query77	488	278	262	262
query78	10401	9393	9307	9307
query79	2167	581	586	581
query80	981	413	413	413
query81	538	239	245	239
query82	212	120	121	120
query83	159	136	133	133
query84	286	70	68	68
query85	988	295	293	293
query86	421	309	277	277
query87	4850	4735	4697	4697
query88	4358	2192	2158	2158
query89	406	293	285	285
query90	2017	201	188	188
query91	137	99	103	99
query92	64	48	50	48
query93	2305	535	536	535
query94	932	292	293	292
query95	354	264	247	247
query96	620	282	284	282
query97	2872	2726	2664	2664
query98	212	203	196	196
query99	1587	1330	1286	1286
Total cold run time: 318782 ms
Total hot run time: 196008 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.07	0.03	0.03
query3	0.23	0.06	0.06
query4	1.63	0.10	0.10
query5	0.42	0.39	0.41
query6	1.18	0.66	0.67
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.56	0.49	0.49
query10	0.55	0.55	0.55
query11	0.14	0.11	0.12
query12	0.15	0.12	0.11
query13	0.60	0.60	0.59
query14	2.72	2.77	2.85
query15	0.89	0.82	0.83
query16	0.38	0.39	0.37
query17	1.05	1.03	1.06
query18	0.20	0.19	0.20
query19	2.10	1.88	1.97
query20	0.02	0.01	0.01
query21	15.36	0.60	0.57
query22	3.03	1.57	2.26
query23	17.02	1.17	0.79
query24	3.00	1.28	1.21
query25	0.27	0.15	0.19
query26	0.42	0.13	0.13
query27	0.04	0.04	0.04
query28	10.54	1.10	1.07
query29	12.54	3.26	3.23
query30	0.24	0.07	0.05
query31	2.87	0.39	0.38
query32	3.26	0.47	0.45
query33	2.99	2.98	3.05
query34	17.03	4.46	4.44
query35	4.51	4.43	4.48
query36	0.67	0.49	0.47
query37	0.09	0.06	0.06
query38	0.04	0.04	0.04
query39	0.03	0.02	0.02
query40	0.15	0.12	0.12
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 107.22 s
Total hot run time: 32.5 s

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2024

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Nov 1, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2024

PR approved by anyone and no changes requested.

@CalvinKirs CalvinKirs merged commit 00be5d4 into apache:master Nov 2, 2024
morningman added a commit to morningman/doris that referenced this pull request Nov 6, 2024
### What problem does this PR solve?

Problem Summary:
```
2024-11-01 19:42:52,521 WARN (mysql-nio-pool-117|9514) [StmtExecutor.execute():616] Analyze failed. stmt[250257, 59c581a512e7468f-b1cfd7d4b63fed33]
org.apache.doris.common.NereidsException: errCode = 2, detailMessage = java.util.ConcurrentModificationException
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:780) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:601) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:564) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:554) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:340) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:243) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:208) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:236) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:413) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = java.util.ConcurrentModificationException
        ... 13 more
Caused by: java.util.ConcurrentModificationException
        at java.util.ArrayList.forEach(ArrayList.java:1513) ~[?:?]
        at org.apache.doris.load.ExportMgr.addExportJobAndRegisterTask(ExportMgr.java:120) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ExportCommand.run(ExportCommand.java:149) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:749) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
```

### Check List (For Committer)

- Test <!-- At least one of them must be included. -->

    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [x] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [x] Previous test can cover this change.
        - [ ] No colde files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:

    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?

    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

- Release note

    <!-- bugfix, feat, behavior changed need a release note -->
    <!-- Add one line release note for this PR. -->
    None

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
morningman added a commit that referenced this pull request Nov 6, 2024
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.1.7-merged dev/3.0.3-merged p0_b reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants