You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xi Lyu (Jira)" <ji...@apache.org> on 2025/12/15 14:14:00 UTC
[jira] [Created] (SPARK-54708) Optimize ML cache cleanup with lazy directory creation
Xi Lyu created SPARK-54708:
------------------------------
Summary: Optimize ML cache cleanup with lazy directory creation
Key: SPARK-54708
URL: https://issues.apache.org/jira/browse/SPARK-54708
Project: Spark
Issue Type: Improvement
Components: Connect
Affects Versions: 4.0.1, 4.1.0
Reporter: Xi Lyu
In current implementation, during the session holder cleanup of non-ML sessions, in mlCache.clear() ([code link|https://github.com/apache/spark/blob/43f7936d7b3a4701e3d0fdb44663006cbe0db70b/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SessionHolder.scala#L381]) , the offloadedModelsDir is also eagerly created and will be deleted, which will cause ~10 ms uncessary latency.
We should make the directory creation lazy and avoid deleting empty directories when it is not needed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org