diff --git a/be/src/runtime/user_function_cache.cpp b/be/src/runtime/user_function_cache.cpp index f89012addd2539..22fe0d9874bc62 100644 --- a/be/src/runtime/user_function_cache.cpp +++ b/be/src/runtime/user_function_cache.cpp @@ -262,7 +262,9 @@ Status UserFunctionCache::_load_cache_entry(const std::string& url, UserFunction RETURN_IF_ERROR(_download_lib(url, entry)); } - RETURN_IF_ERROR(_load_cache_entry_internal(url, entry, loader)); + if (!entry->is_loaded.load()) { + RETURN_IF_ERROR(_load_cache_entry_internal(url, entry, loader)); + } return Status::OK(); }