Skip to content

Commit c8747a9

Browse files
gccsrowen
gcc
authored andcommitted
[SPARK-12048][SQL] Prevent to close JDBC resources twice
Author: gcc <spark-src@condor.rhaag.ip> Closes #10101 from rh99/master. (cherry picked from commit 04b6799) Signed-off-by: Sean Owen <sowen@cloudera.com>
1 parent 2feac49 commit c8747a9

File tree

1 file changed

+1
-0
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc

1 file changed

+1
-0
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ private[sql] class JDBCRDD(
509509
} catch {
510510
case e: Exception => logWarning("Exception closing connection", e)
511511
}
512+
closed = true
512513
}
513514

514515
override def hasNext: Boolean = {

0 commit comments

Comments
 (0)