jjayadeep06 opened a new pull request, #50020: URL: https://github.com/apache/spark/pull/50020
### What changes were proposed in this pull request? Cancelling the Timer non-daemon thread on stopping the BarrierCoordinator ### Why are the changes needed? In Barrier Execution Mode, Spark driver JVM could hang around after calling spark.stop(). Although the Spark Context was shutdown, the JVM was still running. The reason was that there is a non-daemon timer thread named BarrierCoordinator barrier epoch increment timer, which prevented the driver JVM from stopping. ### Does this PR introduce any user-facing change? No ### How was this patch tested? - Run the following scripts locally using `spark-submit`. - Without this change, the JVM would hang there and not exit. - With this change it would exit successfully. **_Code samples to simulate the problem and the corresponding fix is attached below:-_** [barrier_example.py](https://gist.github.com/jshmchenxi/5d7e7c61e1eedd03cd6d676699059e9b#file-barrier_example-py) [xgboost-test.py](https://gist.github.com/bcheena/510230e19120eb9ae631dcafa804409f). ### 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: [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]
