Skip to content

[Fix](pyudf) Fix concurrent race condition when import module#61280

Merged
hello-stephen merged 4 commits intoapache:masterfrom
linrrzqqq:fix-py-sys-module-lock
Mar 27, 2026
Merged

[Fix](pyudf) Fix concurrent race condition when import module#61280
hello-stephen merged 4 commits intoapache:masterfrom
linrrzqqq:fix-py-sys-module-lock

Conversation

@linrrzqqq
Copy link
Copy Markdown
Contributor

@linrrzqqq linrrzqqq commented Mar 12, 2026

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #60630

Problem Summary:

Release note

  1. sys.modules uses modules_name as a key to distinguish imported modules, but the current behavior uses location + modules_name as a key to differentiate and acquire a lock for lib loading, which can cause a concurrent race condition when two threads import the same named module from different locations at the same time.
  2. Currently, importing the same package with different file paths causes issues.
Doris> CREATE FUNCTION func1(INT)
    -> RETURNS INT
    -> PROPERTIES (
    ->     "type" = "PYTHON_UDF",
    ->     "file" = "file:///mnt/disk7/linzhenqi/dv/path_a/pkg.zip",
    ->     "symbol" = "pkg.mdu_a.func",
    ->     "runtime_version" = "3.9.18",
    ->     "always_nullable" = "false"
    -> );
Query OK, 0 rows affected (0.02 sec)

Doris> select func1(1);
+----------+
| func1(1) |
+----------+
|        2 |
+----------+
1 row in set (2.70 sec)

Doris> CREATE FUNCTION func10(INT)
    -> RETURNS INT
    -> PROPERTIES (
    ->     "type" = "PYTHON_UDF",
    ->     "file" = "file:///mnt/disk7/linzhenqi/dv/path_b/pkg.zip",
    ->     "symbol" = "pkg.mdu_b.func",
    ->     "runtime_version" = "3.9.18",
    ->     "always_nullable" = "false"
    -> );
Query OK, 0 rows affected (0.01 sec)

Doris> select func10(1);
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[RUNTIME_ERROR]Failed to load packaged UDF 'pkg.mdu_b.func': No module named 'pkg.mdu_b'. Detail: Python exception: Traceback (most recent call last):
  File "/mnt/disk7/linzhenqi/d4/doris/output/be/plugins/python_udf/python_server.py", line 1058, in _load_package_udf
    udf_module = self._get_or_import_module(location, full_module_name)
  File "/mnt/disk7/linzhenqi/d4/doris/output/be/plugins/python_udf/python_server.py", line 949, in _get_or_import_module
    modul
-- pkg does not exist in path_b mdu_a
Doris> CREATE FUNCTION func_no_module(INT)
    -> RETURNS INT
    -> PROPERTIES (
    ->     "type" = "PYTHON_UDF",
    ->     "file" = "file:///mnt/disk7/linzhenqi/dv/path_b/pkg.zip",
    ->     "symbol" = "pkg.mdu_a.func",
    ->     "runtime_version" = "3.9.18",
    ->     "always_nullable" = "false"
    -> );
Query OK, 0 rows affected (0.00 sec)

-- The pkg cache was used by mistake, and the pkg of the func1 cache was found.
Doris> select func_no_module(1);
+-------------------+
| func_no_module(1) |
+-------------------+
|                 2 |
+-------------------+
1 row in set (0.04 sec)

In the python_server, the location is the cache directory, composed of the function_id. Thus, the internal module_cache only needs location as its key. After importing a cache, immediately remove the mapping maintained in sys.

now


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
Copy Markdown
Contributor

Thearas commented Mar 12, 2026

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?

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
============================================
q1	17641	4433	4286	4286
q2	q3	10650	767	509	509
q4	4666	354	250	250
q5	7563	1191	1008	1008
q6	173	172	145	145
q7	765	840	655	655
q8	9307	1456	1319	1319
q9	4911	4687	4663	4663
q10	6307	1919	1628	1628
q11	478	255	244	244
q12	744	574	471	471
q13	18070	2894	2178	2178
q14	236	224	212	212
q15	933	791	785	785
q16	759	720	674	674
q17	692	851	396	396
q18	6046	5440	5308	5308
q19	1107	972	623	623
q20	492	488	391	391
q21	4432	1800	1372	1372
q22	337	286	240	240
Total cold run time: 96309 ms
Total hot run time: 27357 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4421	4339	4325	4325
q2	q3	3813	4290	3751	3751
q4	838	1166	775	775
q5	4017	4340	4331	4331
q6	183	171	138	138
q7	1722	1588	1507	1507
q8	2412	2675	2552	2552
q9	7728	7437	7608	7437
q10	3809	4002	3628	3628
q11	500	440	418	418
q12	493	601	463	463
q13	2734	3221	2396	2396
q14	278	297	290	290
q15	847	809	833	809
q16	711	776	708	708
q17	1166	1436	1395	1395
q18	7196	6821	6829	6821
q19	877	853	888	853
q20	2106	2177	1989	1989
q21	4185	3451	3353	3353
q22	464	453	388	388
Total cold run time: 50500 ms
Total hot run time: 48327 ms

@doris-robot
Copy link
Copy Markdown

TPC-DS: Total hot run time: 153468 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 13a2845909a2f2120fa3523fd16519542ec7b008, data reload: false

query5	4328	634	520	520
query6	313	226	224	224
query7	4219	464	264	264
query8	351	260	238	238
query9	8717	2673	2700	2673
query10	513	378	333	333
query11	7365	5875	5547	5547
query12	193	126	126	126
query13	1261	453	349	349
query14	5737	3843	3700	3700
query14_1	2804	2795	2807	2795
query15	205	198	177	177
query16	997	476	421	421
query17	1118	721	625	625
query18	2441	455	361	361
query19	224	211	189	189
query20	137	129	132	129
query21	222	147	122	122
query22	4931	5035	4915	4915
query23	16676	16089	15991	15991
query23_1	15975	16175	15824	15824
query24	8695	1761	1302	1302
query24_1	1293	1277	1309	1277
query25	604	515	486	486
query26	1258	268	163	163
query27	2913	476	282	282
query28	4488	1837	1872	1837
query29	834	562	484	484
query30	312	249	204	204
query31	1337	1283	1215	1215
query32	92	68	71	68
query33	510	329	268	268
query34	906	910	553	553
query35	641	666	598	598
query36	1108	1107	922	922
query37	131	92	80	80
query38	2933	2933	2872	2872
query39	882	886	855	855
query39_1	837	829	831	829
query40	239	156	137	137
query41	65	60	58	58
query42	302	301	296	296
query43	239	248	217	217
query44	
query45	239	189	184	184
query46	877	976	602	602
query47	2170	2166	2032	2032
query48	328	313	233	233
query49	630	455	392	392
query50	713	280	221	221
query51	4135	4147	4094	4094
query52	299	302	286	286
query53	291	336	279	279
query54	298	276	269	269
query55	88	86	86	86
query56	323	318	316	316
query57	1360	1348	1302	1302
query58	283	274	266	266
query59	1374	1482	1262	1262
query60	327	326	333	326
query61	149	148	148	148
query62	637	600	536	536
query63	307	276	272	272
query64	5091	1296	996	996
query65	
query66	1451	471	353	353
query67	16475	16387	16296	16296
query68	
query69	389	302	283	283
query70	969	959	942	942
query71	350	307	301	301
query72	2871	2689	2415	2415
query73	533	544	319	319
query74	10007	9975	9813	9813
query75	2861	2745	2448	2448
query76	2271	1026	658	658
query77	361	382	312	312
query78	11114	11337	10650	10650
query79	2620	798	594	594
query80	1765	591	543	543
query81	550	282	243	243
query82	973	149	117	117
query83	353	255	250	250
query84	259	126	99	99
query85	896	491	435	435
query86	411	306	304	304
query87	3155	3175	3079	3079
query88	3548	2641	2624	2624
query89	426	368	347	347
query90	2077	174	180	174
query91	165	164	136	136
query92	81	74	69	69
query93	1151	830	497	497
query94	629	306	304	304
query95	581	341	375	341
query96	634	539	232	232
query97	2524	2492	2462	2462
query98	234	226	219	219
query99	992	996	918	918
Total cold run time: 237681 ms
Total hot run time: 153468 ms

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run beut

@doris-robot
Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.66% (19709/37428)
Line Coverage 36.24% (184155/508185)
Region Coverage 32.35% (142150/439432)
Branch Coverage 33.57% (62166/185204)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.54% (26205/36629)
Line Coverage 54.22% (274506/506319)
Region Coverage 51.32% (227469/443248)
Branch Coverage 52.84% (98064/185582)

@zclllyybb
Copy link
Copy Markdown
Contributor

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code Review Summary

PR Goal: Fix concurrent race condition when importing Python UDF modules with the same name from different locations. The root cause is that sys.modules is a global dict keyed by module name only, but the import lock was keyed by (location, module_name), allowing two threads to concurrently modify sys.modules for the same module name without mutual exclusion.

Verdict: The fix is logically correct and well-scoped. Changing the _import_locks key from (location, module_name) to just module_name properly serializes concurrent imports of same-named modules regardless of their source location. Two minor issues found (stale comments and a formatting nit).

Critical Checkpoint Conclusions

  • Does the code accomplish its goal? Yes. By keying the import lock on module_name alone, two threads importing the same-named module from different locations will now properly serialize, preventing the sys.modules race condition.
  • Is this modification small, clear, and focused? Yes. Only changes the lock key granularity, preserving all other logic.
  • Concurrency correctness? The lock is now correctly aligned with the shared resource (sys.modules, keyed by module name). The _module_cache remains keyed by (location, module_name) which is correct since it needs location-awareness. The double-checked locking pattern on _import_locks itself is fine since Python's GIL provides safe dict reads.
  • Are there functionally parallel code paths? The _clear_modules_from_location call site is also updated consistently.
  • Configuration items? None added. N/A.
  • Incompatible changes? None. Internal-only change.
  • Test coverage? No test added. This is a concurrency race condition that is inherently difficult to reproduce in a unit test. The scenario is well-described in the PR body and related PR #60630. A regression test exercising concurrent same-named module imports from different locations would be ideal but is understandably hard to write deterministically.
  • Observability? N/A for this change.
  • Performance? Slightly broader lock scope (per-module vs per-location+module), meaning imports of the same module name from different locations will now serialize. This is correct behavior and the performance impact is negligible since module imports are infrequent.
  • Other issues? Two stale comments found (see inline comments), plus one minor formatting nit.

# Use a per-(location, module) lock to prevent race conditions during import
import_lock = ModuleUDFLoader._get_import_lock(location, full_module_name)
import_lock = ModuleUDFLoader._get_import_lock(full_module_name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Stale comment. This now uses a per-module lock (not per-(location, module) lock). Should be updated to:

# Use a per-module lock to prevent race conditions during import

Copy link
Copy Markdown
Contributor

@zclllyybb zclllyybb left a comment

Choose a reason for hiding this comment

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

need more investigation

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17610	4380	4277	4277
q2	q3	10644	787	515	515
q4	4675	366	261	261
q5	7579	1200	1008	1008
q6	180	174	145	145
q7	789	833	693	693
q8	9293	1444	1308	1308
q9	4963	4819	4749	4749
q10	6402	1915	1678	1678
q11	478	261	247	247
q12	761	581	471	471
q13	18242	2895	2174	2174
q14	228	227	209	209
q15	q16	727	743	662	662
q17	720	855	420	420
q18	5997	5280	5188	5188
q19	1105	986	602	602
q20	530	482	377	377
q21	4513	1816	1405	1405
q22	341	489	331	331
Total cold run time: 95777 ms
Total hot run time: 26720 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4766	4572	4469	4469
q2	q3	3901	4363	3826	3826
q4	922	1193	803	803
q5	4071	4441	4372	4372
q6	193	178	145	145
q7	1811	1672	1519	1519
q8	2453	2724	2581	2581
q9	7628	7367	7509	7367
q10	3767	3934	3579	3579
q11	497	432	419	419
q12	483	601	472	472
q13	2790	3104	2281	2281
q14	282	306	284	284
q15	q16	720	831	882	831
q17	1169	1351	1343	1343
q18	7288	6814	6533	6533
q19	917	897	956	897
q20	2165	2165	1988	1988
q21	3967	3445	3343	3343
q22	478	454	371	371
Total cold run time: 50268 ms
Total hot run time: 47423 ms

@doris-robot
Copy link
Copy Markdown

TPC-DS: Total hot run time: 167763 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 98041713b797394e68fbb2a6259c0fcd457fb3df, data reload: false

query5	4328	647	527	527
query6	333	216	208	208
query7	4214	466	269	269
query8	332	250	233	233
query9	8707	2690	2713	2690
query10	507	372	350	350
query11	6973	5104	4877	4877
query12	174	125	123	123
query13	1247	464	331	331
query14	5766	3723	3438	3438
query14_1	2787	2794	2747	2747
query15	206	198	174	174
query16	960	456	445	445
query17	852	694	583	583
query18	2425	424	331	331
query19	208	202	173	173
query20	127	124	121	121
query21	214	129	110	110
query22	13219	13371	13035	13035
query23	15831	15566	15663	15566
query23_1	16072	15864	15939	15864
query24	7487	1695	1317	1317
query24_1	1282	1301	1265	1265
query25	600	546	486	486
query26	1300	281	169	169
query27	3278	503	328	328
query28	4640	1995	2040	1995
query29	874	625	587	587
query30	317	234	197	197
query31	1014	961	877	877
query32	83	77	73	73
query33	532	357	293	293
query34	903	869	534	534
query35	632	703	598	598
query36	1112	1160	975	975
query37	136	95	89	89
query38	2954	2947	2906	2906
query39	864	845	812	812
query39_1	809	804	800	800
query40	236	153	139	139
query41	68	64	63	63
query42	261	257	261	257
query43	236	246	226	226
query44	
query45	198	193	187	187
query46	865	1002	612	612
query47	2128	2129	2083	2083
query48	303	326	233	233
query49	641	510	375	375
query50	672	280	216	216
query51	4038	4002	3979	3979
query52	264	261	255	255
query53	286	340	285	285
query54	294	263	258	258
query55	95	88	84	84
query56	307	317	293	293
query57	1947	1625	1766	1625
query58	277	268	269	268
query59	2769	2963	2733	2733
query60	335	332	325	325
query61	147	146	148	146
query62	635	587	545	545
query63	304	279	270	270
query64	5050	1272	998	998
query65	
query66	1463	462	351	351
query67	24267	24224	24111	24111
query68	
query69	412	305	279	279
query70	983	930	965	930
query71	348	305	304	304
query72	2733	2666	2466	2466
query73	537	561	337	337
query74	9594	9555	9392	9392
query75	2854	2719	2477	2477
query76	2282	1017	687	687
query77	365	374	300	300
query78	10864	11115	10476	10476
query79	1135	736	569	569
query80	1297	623	544	544
query81	540	257	231	231
query82	983	147	117	117
query83	330	269	244	244
query84	294	124	103	103
query85	899	487	430	430
query86	412	319	323	319
query87	3109	3173	3070	3070
query88	3544	2642	2630	2630
query89	423	377	352	352
query90	2006	175	169	169
query91	163	159	135	135
query92	75	75	70	70
query93	969	852	497	497
query94	643	286	284	284
query95	573	393	316	316
query96	648	513	229	229
query97	2466	2488	2387	2387
query98	240	222	218	218
query99	1031	950	914	914
Total cold run time: 249178 ms
Total hot run time: 167763 ms

@doris-robot
Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.66% (19726/37458)
Line Coverage 36.24% (184258/508422)
Region Coverage 32.38% (142323/439553)
Branch Coverage 33.57% (62198/185263)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.63% (26263/36663)
Line Coverage 54.37% (275509/506700)
Region Coverage 51.52% (228549/443601)
Branch Coverage 53.01% (98470/185745)

@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17583	4485	4322	4322
q2	q3	10641	801	526	526
q4	4682	357	248	248
q5	7553	1204	1015	1015
q6	178	174	147	147
q7	771	855	668	668
q8	9301	1473	1334	1334
q9	4879	4737	4703	4703
q10	6246	1918	1671	1671
q11	471	257	248	248
q12	694	579	464	464
q13	18024	2728	1957	1957
q14	231	229	212	212
q15	q16	731	728	661	661
q17	739	831	456	456
q18	6019	5329	5278	5278
q19	1114	994	609	609
q20	526	492	395	395
q21	4342	1837	1392	1392
q22	356	308	245	245
Total cold run time: 95081 ms
Total hot run time: 26551 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4904	4707	4608	4608
q2	q3	3899	4322	3819	3819
q4	866	1188	789	789
q5	4060	4395	4353	4353
q6	194	180	149	149
q7	1814	1662	1515	1515
q8	2545	2716	2548	2548
q9	7702	7465	7514	7465
q10	3758	3935	3605	3605
q11	521	430	435	430
q12	505	620	443	443
q13	2493	2952	2064	2064
q14	274	295	293	293
q15	q16	773	804	775	775
q17	1160	1339	1378	1339
q18	7064	6753	6766	6753
q19	900	937	947	937
q20	2063	2167	1985	1985
q21	3957	3531	3406	3406
q22	470	440	394	394
Total cold run time: 49922 ms
Total hot run time: 47670 ms

@doris-robot
Copy link
Copy Markdown

TPC-DS: Total hot run time: 168525 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 8dcf3edfeac73ed9b1e5bff26c28c34bb7590df8, data reload: false

query5	4323	638	492	492
query6	327	225	210	210
query7	4214	478	269	269
query8	343	247	229	229
query9	8774	2713	2718	2713
query10	535	384	330	330
query11	6927	5127	4854	4854
query12	180	128	128	128
query13	1278	452	358	358
query14	5795	3739	3451	3451
query14_1	2840	2854	2853	2853
query15	204	193	174	174
query16	997	483	461	461
query17	1122	751	648	648
query18	2436	450	344	344
query19	203	199	175	175
query20	133	124	129	124
query21	214	134	112	112
query22	13274	13511	13144	13144
query23	16278	15858	16112	15858
query23_1	16172	16213	16053	16053
query24	8001	1676	1258	1258
query24_1	1267	1267	1315	1267
query25	576	465	399	399
query26	1247	272	156	156
query27	2766	502	294	294
query28	4486	1826	1818	1818
query29	857	555	469	469
query30	292	222	190	190
query31	1012	951	879	879
query32	82	69	70	69
query33	517	326	284	284
query34	890	894	532	532
query35	641	669	591	591
query36	1105	1084	958	958
query37	129	95	77	77
query38	2897	2985	2833	2833
query39	863	845	817	817
query39_1	806	795	792	792
query40	234	151	135	135
query41	62	58	58	58
query42	257	259	250	250
query43	254	252	214	214
query44	
query45	193	187	178	178
query46	872	991	608	608
query47	2130	2171	2084	2084
query48	312	329	222	222
query49	621	442	378	378
query50	694	315	206	206
query51	4055	4046	4022	4022
query52	262	272	256	256
query53	289	338	287	287
query54	315	263	258	258
query55	98	86	87	86
query56	324	323	352	323
query57	1917	1754	1799	1754
query58	295	290	274	274
query59	2817	2931	2761	2761
query60	339	340	329	329
query61	162	152	154	152
query62	638	590	543	543
query63	302	274	286	274
query64	5178	1268	1030	1030
query65	
query66	1459	457	361	361
query67	24261	24518	24263	24263
query68	
query69	402	314	298	298
query70	984	982	969	969
query71	342	307	301	301
query72	3017	2890	2654	2654
query73	544	548	316	316
query74	9612	9651	9368	9368
query75	2872	2767	2505	2505
query76	2302	1027	677	677
query77	375	382	324	324
query78	10950	11117	10464	10464
query79	1123	786	574	574
query80	1388	669	552	552
query81	551	268	231	231
query82	1239	155	119	119
query83	365	265	242	242
query84	246	125	100	100
query85	926	506	478	478
query86	438	305	320	305
query87	3114	3094	3019	3019
query88	3569	2675	2635	2635
query89	474	377	343	343
query90	1965	181	171	171
query91	166	167	135	135
query92	75	79	73	73
query93	927	869	496	496
query94	659	330	287	287
query95	577	344	314	314
query96	659	516	226	226
query97	2458	2470	2394	2394
query98	239	221	217	217
query99	994	1019	928	928
Total cold run time: 250170 ms
Total hot run time: 168525 ms

@linrrzqqq linrrzqqq force-pushed the fix-py-sys-module-lock branch from 8dcf3ed to 61785f6 Compare March 24, 2026 11:33
@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.79% (19858/37615)
Line Coverage 36.30% (185548/511189)
Region Coverage 32.52% (143547/441363)
Branch Coverage 33.76% (62906/186329)

@linrrzqqq linrrzqqq force-pushed the fix-py-sys-module-lock branch from 61785f6 to 7538c27 Compare March 24, 2026 13:10
@linrrzqqq
Copy link
Copy Markdown
Contributor Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17622	4451	4339	4339
q2	q3	10644	764	516	516
q4	4675	347	247	247
q5	7552	1200	1018	1018
q6	176	174	147	147
q7	778	851	668	668
q8	9538	1460	1306	1306
q9	4998	4730	4713	4713
q10	6325	1906	1679	1679
q11	482	249	242	242
q12	751	576	466	466
q13	18066	2664	1953	1953
q14	235	228	212	212
q15	q16	725	755	660	660
q17	739	846	418	418
q18	5863	5398	5168	5168
q19	1319	995	615	615
q20	550	483	378	378
q21	4548	1825	1466	1466
q22	359	486	327	327
Total cold run time: 95945 ms
Total hot run time: 26538 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4714	4689	4553	4553
q2	q3	4004	4414	3795	3795
q4	847	1202	786	786
q5	4065	4350	4386	4350
q6	196	176	146	146
q7	1802	1703	1610	1610
q8	2535	2815	2562	2562
q9	7524	7418	7349	7349
q10	3801	3956	3614	3614
q11	509	439	435	435
q12	486	592	444	444
q13	2409	3019	2076	2076
q14	311	310	283	283
q15	q16	721	773	717	717
q17	1192	1418	1407	1407
q18	7248	6816	6598	6598
q19	1130	929	888	888
q20	2135	2215	1986	1986
q21	3967	3478	3398	3398
q22	452	422	394	394
Total cold run time: 50048 ms
Total hot run time: 47391 ms

@doris-robot
Copy link
Copy Markdown

TPC-DS: Total hot run time: 169310 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 7538c27c91ead647b9e952e081739a40de1687a1, data reload: false

query5	4352	638	501	501
query6	335	227	208	208
query7	4230	473	268	268
query8	349	240	222	222
query9	8712	2736	2710	2710
query10	479	395	334	334
query11	6969	5120	4894	4894
query12	191	130	131	130
query13	1293	451	359	359
query14	5797	3718	3478	3478
query14_1	2830	2805	2802	2802
query15	205	195	176	176
query16	992	458	455	455
query17	1124	749	625	625
query18	2475	455	356	356
query19	219	213	188	188
query20	140	131	127	127
query21	213	142	111	111
query22	13294	14143	14478	14143
query23	16682	16521	16074	16074
query23_1	16377	15759	15733	15733
query24	7145	1637	1217	1217
query24_1	1213	1242	1225	1225
query25	576	537	419	419
query26	1249	263	156	156
query27	2753	489	288	288
query28	4445	1848	1878	1848
query29	838	568	495	495
query30	300	233	203	203
query31	1018	944	878	878
query32	81	72	74	72
query33	514	358	286	286
query34	893	865	527	527
query35	666	695	592	592
query36	1096	1142	990	990
query37	139	97	82	82
query38	2900	2921	2853	2853
query39	868	847	808	808
query39_1	813	805	801	801
query40	232	154	137	137
query41	68	62	60	60
query42	261	259	253	253
query43	235	250	221	221
query44	
query45	198	196	182	182
query46	865	983	605	605
query47	2136	2152	2098	2098
query48	321	314	237	237
query49	629	466	423	423
query50	686	303	209	209
query51	4071	4021	4000	4000
query52	264	273	256	256
query53	294	337	298	298
query54	348	279	276	276
query55	98	86	81	81
query56	321	331	305	305
query57	1923	1721	1844	1721
query58	285	278	275	275
query59	2787	2943	2778	2778
query60	361	346	339	339
query61	159	154	149	149
query62	624	584	548	548
query63	308	283	275	275
query64	5068	1294	1017	1017
query65	
query66	1455	486	362	362
query67	24307	24308	24273	24273
query68	
query69	403	314	293	293
query70	1007	953	905	905
query71	341	301	297	297
query72	2865	2689	2433	2433
query73	541	534	325	325
query74	9574	9556	9438	9438
query75	2921	2797	2466	2466
query76	2283	1030	673	673
query77	369	384	299	299
query78	10977	11130	10486	10486
query79	1118	784	576	576
query80	1347	625	554	554
query81	525	264	226	226
query82	1344	154	117	117
query83	336	288	253	253
query84	256	117	105	105
query85	958	493	458	458
query86	402	294	291	291
query87	3148	3110	2989	2989
query88	3561	2674	2624	2624
query89	435	371	340	340
query90	1922	178	177	177
query91	169	166	144	144
query92	77	75	71	71
query93	885	854	491	491
query94	577	316	309	309
query95	597	407	317	317
query96	642	518	226	226
query97	2456	2492	2419	2419
query98	230	221	229	221
query99	1025	981	940	940
Total cold run time: 250517 ms
Total hot run time: 169310 ms

@doris-robot
Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.79% (19857/37615)
Line Coverage 36.30% (185542/511189)
Region Coverage 32.54% (143624/441363)
Branch Coverage 33.77% (62917/186329)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.29% (26995/36832)
Line Coverage 56.75% (289198/509634)
Region Coverage 54.13% (241129/445483)
Branch Coverage 55.79% (104268/186897)

Copy link
Copy Markdown
Contributor

@zclllyybb zclllyybb left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen hello-stephen merged commit 9326ce7 into apache:master Mar 27, 2026
29 of 31 checks passed
@linrrzqqq linrrzqqq deleted the fix-py-sys-module-lock branch March 27, 2026 02:42
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/4.1.x dev/4.1.x-conflict reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants