[ https://issues.apache.org/jira/browse/SPARK-12088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15035278#comment-15035278 ]
Huaxin Gao commented on SPARK-12088: ------------------------------------ I am doing a PR now > check connection.isClose before connection.getAutoCommit in JDBCRDD.close > ------------------------------------------------------------------------- > > Key: SPARK-12088 > URL: https://issues.apache.org/jira/browse/SPARK-12088 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.5.2, 1.6.0 > Reporter: Huaxin Gao > Priority: Minor > > in JDBCRDD, it has > if (!conn.getAutoCommit && !conn.isClosed) { > try { > conn.commit() > } > . . . . . . > In my test, the connection is already closed so conn.getAutoCommit throw > Exception. We should check !conn.isClosed before checking !conn.getAutoCommit > to avoid the Exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org