ShadowStackDev commented on PR #69255:
URL: https://github.com/apache/doris/pull/69255#issuecomment-6758556137

   **[Major] Live Python functions in `mysql` and `information_schema` can be 
cleaned up as dropped**
   
   Reviewed at `8649a2b`. `CREATE FUNCTION` accepts these two databases, but 
`InternalCatalog` publishes them directly without binding them to the new 
function-ID index. When a BE reports one of their function IDs, 
`Env.getFunctionById` returns null and `ReportHandler` queues cleanup even 
though the function is still registered. [Cleanup 
decision](https://github.com/apache/doris/blob/8649a2b716085c594a65c0588dc9cab9b2161152/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java#L405-L419)
   
   The cleanup discards the function's warm pool and marks the package cache 
for deletion. If an active client still holds the package, new calls can fail 
with `SERVICE_UNAVAILABLE` and `Python UDF function … is being deleted` until 
the old reference is released. This can happen without any `DROP` or `RECOVER`.
   
   Please bind the serving instances of both system databases to the 
function-ID index during startup and after `Env.loadCatalog` replaces the 
catalog manager. A regression test should verify that a BE resource report for 
a live function in one of these databases does not enqueue cleanup, including 
after catalog image load.
   


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