Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2702

Invalid commit()/rollback() behavior on JDBC connection

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.17.0
    • Fix Version/s: None
    • Component/s: jdbc-adapter
    • Labels:
      None

      Description

      We're using Tibco Spotfire with a Calcite enabled JDBC driver as a pooled datasource. There is an issue that the Spotfire connection pool rans out of connections quite fast and we could track it down to the behavior of org.apache.calcite.avatica.AvaticaConnection#commit. This delegates to org.apache.calcite.jdbc.CalciteMetaImpl#commit which throws an UnsupportedOperationException.

      It looks like that this behavior is not correct: according to the JavaDoc of java.sql.DatabaseMetaData#supportsTransactions a JDBC driver should treat commit as a NOOP if the database (or in this case the driver) does not support transactions:

      /**
      * Retrieves whether this database supports transactions. If not, invoking the
      * method <code>commit</code> is a noop, and the isolation level is
      * <code>TRANSACTION_NONE</code>.
      *
      * @return <code>true</code> if transactions are supported;
      * <code>false</code> otherwise
      * @exception SQLException if a database access error occurs
      */
      boolean supportsTransactions() throws SQLException;

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dirk.mahler Dirk Mahler
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: