Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12088

check connection.isClose before connection.getAutoCommit in JDBCRDD.close

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.2, 1.6.0
    • Fix Version/s: 1.6.0, 2.0.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              huaxingao Huaxin Gao
              Reporter:
              huaxing Huaxin Gao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: