cloud-fan commented on code in PR #53914:
URL: https://github.com/apache/spark/pull/53914#discussion_r2731195102
##########
core/src/main/scala/org/apache/spark/executor/Executor.scala:
##########
@@ -628,15 +677,37 @@ private[spark] class Executor(
override def run(): Unit = {
// Classloader isolation
+ // We need to retry the cache lookup if the session was evicted between
get() and acquire().
+ // This can happen when the cache is full and another task triggers
eviction.
val isolatedSession = taskDescription.artifacts.state match {
case Some(jobArtifactState) =>
- isolatedSessionCache.get(jobArtifactState.uuid, () =>
newSessionState(jobArtifactState))
- case _ => defaultSessionState
+ var session: IsolatedSessionState = null
Review Comment:
but this task needs to wait to get the session anyway, a separate thread
won't be very useful?
BTW, this is a very corner case: between the task get the cached session and
acquire it, another task evicts the session. I can hardcode a max wait num
iterations if you think this can be risky.
--
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]