Skip to content

Commit 49248c7

Browse files
committed
Handle ControlThrowable
1 parent 676317b commit 49248c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/scala/org/apache/spark/util/CheckpointingIterator.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import java.io.OutputStream
2222
import java.util.concurrent.ConcurrentHashMap
2323

2424
import scala.reflect.ClassTag
25-
import scala.util.control.NonFatal
25+
import scala.util.control.{ControlThrowable, NonFatal}
2626

2727
import org.apache.hadoop.fs.{FileSystem, Path}
2828

@@ -123,6 +123,7 @@ private[spark] class CheckpointingIterator[T: ClassTag](
123123
try {
124124
body
125125
} catch {
126+
case e: ControlThrowable => throw e
126127
case e: Throwable =>
127128
try {
128129
cleanup()
@@ -213,6 +214,7 @@ private[spark] object CheckpointingIterator {
213214
context,
214215
blockSize)
215216
} catch {
217+
case e: ControlThrowable => throw e
216218
case e: Throwable =>
217219
releaseLockForPartition(id)
218220
throw e

0 commit comments

Comments
 (0)