You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2015/12/03 09:48:10 UTC

[jira] [Resolved] (SPARK-12088) check connection.isClose before connection.getAutoCommit in JDBCRDD.close

     [ https://issues.apache.org/jira/browse/SPARK-12088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved SPARK-12088.
-------------------------------
       Resolution: Fixed
         Assignee: Huaxin Gao
    Fix Version/s: 2.0.0
                   1.6.1

Resolved by https://github.com/apache/spark/pull/10095

> 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
>            Assignee: Huaxin Gao
>            Priority: Minor
>             Fix For: 1.6.1, 2.0.0
>
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org