Resol1992 commented on code in PR #37404:
URL: https://github.com/apache/spark/pull/37404#discussion_r943073186
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileStatusCache.scala:
##########
@@ -36,6 +37,8 @@ import org.apache.spark.util.SizeEstimator
object FileStatusCache {
private var sharedCache: SharedInMemoryCache = _
+ private[spark] val sessionToCache = new mutable.HashMap[String,
FileStatusCache]
Review Comment:
@srowen Thanks for reminding, I should remove the entry from the map when
closing a session, I will fix it.
And with this fix, I think the memory problem should be fine, because the
total size of `sessionToCache` is consist of 'SessionUUID' and
`FileStatusCache`, the total size of `FileStatusCache` is controlled by the max
size of `sharedCache`, and the remaining parts is equal to (the number of
SparkSession * the size of every `SessionUUID`), this would not cost too much
memory.
--
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]