linrrzqqq commented on code in PR #62167:
URL: https://github.com/apache/doris/pull/62167#discussion_r3048900817
##########
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
"""
- cache_key = module_name
+ cache_key = module_name.split(".", 1)[0]
Review Comment:
fixed
##########
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
"""
- cache_key = module_name
+ cache_key = module_name.split(".", 1)[0]
Review Comment:
added
--
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]