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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -554,6 +558,7 @@ public void dropDb(String dbName, boolean ifExists, boolean 
force) throws DdlExc
             unlock();
         }
 
+        FunctionUtil.cleanUdfCache(functionSignatures);

Review Comment:
   [P2] Keep recovered functions usable while old queries retain packages
   
   This also runs for a recoverable, non-FORCE DROP DATABASE. Let a 
long-running query over dbB's table use a module UDF in table-free dbA, then 
DROP and RECOVER dbA while that query remains alive. Cleanup marks its package 
for deletion and installs a tombstone; the old client's process retains the 
package. RECOVER preserves the Function ID, so a fresh valid query against the 
restored function reaches UserFunctionCache::_get_cache_entry and fails with 
SERVICE_UNAVAILABLE ("is being deleted") until the old query releases every 
package reference. A queued cleanup delivered after recovery can cause the same 
problem. Coordinate recoverable cleanup with resource incarnations so restored 
functions can acquire usable packages while existing clients retain theirs, and 
cover invocation after RECOVER before the old client closes. This differs from 
the existing late-query thread: the ID is live again and the failing query is 
freshly analyzed.



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