j1wonpark opened a new pull request, #58308:
URL: https://github.com/apache/spark/pull/58308

   ### What changes were proposed in this pull request?
   
   Backport of #58205 to branch-4.2: run the request loop of 
`TransformWithStateInPySparkStateServer.run()` inside `Utils.tryWithResource` 
so the accepted socket is always closed. This branch does not have SPARK-58977, 
so unlike master the `accept()` call is unchanged.
   
   ### Why are the changes needed?
   
   The accepted socket is never closed, leaking one file descriptor per task 
until the executor exhausts the ephemeral port range 
(`java.net.BindException`). See #58205 for details.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   The two tests added in #58205 are included; 
`TransformWithStateInPySparkStateServerSuite` passes locally on this branch.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Yes. Generated-by: Claude Opus 5
   


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

Reply via email to