github-actions[bot] commented on code in PR #62167:
URL: https://github.com/apache/doris/pull/62167#discussion_r3044205471


##########
be/src/udf/python/python_server.py:
##########
@@ -835,13 +835,13 @@ class ModuleUDFLoader(UDFLoader):
     @classmethod
     def _get_import_lock(cls, module_name: str) -> threading.Lock:
         """
-        Get or create a reentrant lock for the given module name.
+        Get or create an import lock for the given module namespace.
 
         Uses double-checked locking pattern for optimal performance:
         - Fast path: return existing lock without acquiring global lock
         - Slow path: create new lock under global lock protection
         """

Review Comment:
   This widens the import lock to the top-level package, which matches the fact 
that `_clear_modules_from_sys()` removes ancestor packages as well. The 
remaining gap is coverage: there is still no automated test that reproduces 
concurrent loads of `pkg.mod1` and `pkg.mod2` from separate requests, which is 
the exact `suite-thread-*` race described in the PR. 
`test_pythonudtf_pkg_isolation.groovy` is single-threaded, so this can regress 
silently. Please add a regression or python_server-level concurrency test for 
that failure mode.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to