linrrzqqq commented on code in PR #69255:
URL: https://github.com/apache/doris/pull/69255#discussion_r4467083939
##########
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:
1. DROP 会将 Python 包的 cacheEntry(可以理解为一个udf 缓存文件的内部管理类) 标记为待删除,用于阻止后续查询为同一个
Function ID 重建缓存,防止旧 cacheEntry
析构时删除新查询正在使用的文件。旧查询还没完全结束时,包文件会继续保留,最后一个引用释放后才删除。
2. 如果同时要求 DROP 开始清理、RECOVER 保留 Function
ID,并且恢复后的新查询立即可用,就得增加函数的版本信息version,将 缓存文件 按 function_id 映射调整为按 (function_id,
version) 映射。
问题:
在引入version
信息之后,需要改变原有的文件路径信息(\<cache>/\<shard>/\<fid>.\<checksum>.\<filename>.zip),
需要在目录或缓存元数据中保存版本信息,保证 BE 重启后仍能区分这些资源,原本只存 fid,后续还得存 version 版本信息,就会搞出兼容性问题。
所以我感觉这里drop 后快速恢复导致的不可用的情况,反正用户第一次调用也会缓存,也要下载依赖,也很慢,又或者实在不行重建函数也能解决这个问题。
感觉都比现在增加 version 或者 recovery 改 fid 可接受些
--
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]