HyukjinKwon commented on a change in pull request #32169:
URL: https://github.com/apache/spark/pull/32169#discussion_r613924852



##########
File path: core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala
##########
@@ -161,10 +162,21 @@ private[spark] abstract class BasePythonRunner[IN, OUT](
             logWarning("Failed to close worker socket", e)
         }
       }
+      if (reuseWorker) {
+        val key = (worker, context.taskAttemptId)
+        PythonRunner.runningMonitorThreads.remove(key)

Review comment:
       Hmmm .. I don't like this very much because we're adding some more 
possibility for leaking ... this task completion lister itself is not something 
guaranteed in fact IIRC. 
   
   BTW, it would be great to elabourate what's going on here. So the problem is 
that there are multiple monitor threads that wait for the same Python (forked) 
worker with the same socket .. right




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to