You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/02 06:31:44 UTC
[GitHub] [spark] LuciferYang commented on a change in pull request #32866: [SPARK-35713]Bug fix for thread leak in JobCancellationSuite
LuciferYang commented on a change in pull request #32866:
URL: https://github.com/apache/spark/pull/32866#discussion_r662769397
##########
File path: core/src/test/scala/org/apache/spark/JobCancellationSuite.scala
##########
@@ -234,7 +234,7 @@ class JobCancellationSuite extends SparkFunSuite with Matchers with BeforeAndAft
val jobA = Future {
sc.setJobGroup("jobA", "this is a job to be cancelled", interruptOnCancel = true)
sc.parallelize(1 to 10000, 2).map { i =>
- while (true) { }
+ while (true) { Thread.sleep(100) }
Review comment:
If we are entangled in this Infinite loop, we can add an `AtomicBoolean` status variable and update it to `false` in finally block to jump out of the loop
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org