You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xi-db (via GitHub)" <gi...@apache.org> on 2025/12/15 14:17:17 UTC
[PR] [SPARK-54708][CONNECT] Optimize ML cache cleanup with lazy directory creation [spark]
xi-db opened a new pull request, #53475:
URL: https://github.com/apache/spark/pull/53475
### What changes were proposed in this pull request?
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 need to be deleted, which will cause ~10 ms unnecessary latency.
In this PR, we are making the directory creation lazy to avoid deleting empty directories when there is no SparkML operations on the session.
### Why are the changes needed?
Improve the performance of ReleaseSession RPC by ~10ms.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
New test and existing tests.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-54708][CONNECT][ML] Optimize ML cache cleanup with lazy directory creation [spark]
Posted by "WeichenXu123 (via GitHub)" <gi...@apache.org>.
WeichenXu123 commented on PR #53475:
URL: https://github.com/apache/spark/pull/53475#issuecomment-3658363667
merged to master
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-54708][CONNECT][ML] Optimize ML cache cleanup with lazy directory creation [spark]
Posted by "WeichenXu123 (via GitHub)" <gi...@apache.org>.
WeichenXu123 closed pull request #53475: [SPARK-54708][CONNECT][ML] Optimize ML cache cleanup with lazy directory creation
URL: https://github.com/apache/spark/pull/53475
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org