linrrzqqq commented on code in PR #67046:
URL: https://github.com/apache/doris/pull/67046#discussion_r3861132671


##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -2582,17 +2582,23 @@ void clean_trash_callback(StorageEngine& engine, const 
TAgentTaskRequest& req) {
 
 void clean_udf_cache_callback(const TAgentTaskRequest& req) {
     const auto& clean_req = req.clean_udf_cache_req;
+    const bool drop_by_function_id = clean_req.__isset.function_id && 
clean_req.function_id > 0;
 
     if (doris::config::enable_java_support) {
-        
static_cast<void>(Jni::Util::clean_udf_class_load_cache(clean_req.function_signature));
-    }
-
-    if (clean_req.__isset.function_id && clean_req.function_id > 0) {
+        WARN_IF_ERROR(
+                Jni::Util::clean_udf_class_load_cache(
+                        clean_req.function_signature,
+                        drop_by_function_id ? clean_req.function_id : 0),
+                fmt::format("failed to clean Java UDF cache, 
function_signature={}, function_id={}",
+                            clean_req.function_signature, 
clean_req.function_id));
+    }
+    if (drop_by_function_id) {
         
UserFunctionCache::instance()->drop_function_cache(clean_req.function_id);

Review Comment:
   `clean_req.function_id` 和 `python udf`是在同一个版本支持上的,不存在升级过程中 python udf 无 id 
可查的情况



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