Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2782

Decide, implement behavior for transaction-related JDBC methods

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Officially, JDBC requires transaction support. Because of that, the JDBC specification (PDF document and Javadoc) addresses the behavior of transaction-related methods only for the case in which transactions are supported.

      In particular, JDBC does not specify the behavior when transactions are not supported.

      Therefore, it is not clear what behavior a JDBC client tool would expect, or be programmed to handle, from a JDBC driver and back end that do not support transactions (i.e., Drill).

      In turn, that means that it is not clear exactly what Drill's JDBC driver's transaction-related methods should do.

      For example, if a tool tries to call setAutoCommit(false), issue a create-view query, and call commit():

      • Should Drill throw an exception at setAutoCommit(false) (because Drill's behavior, which is effectively auto-commit mode, can't be disabled)? If so, would tools likely be able to handle that exception, specifically, by switching to using auto-commit mode, not calling commit() after the query?
      • Should Drill silently accept the setAutoCommit(false) even though it can't really implement it? If so, should it silently accept the commit(), to make things look "normal" to calling tools? If so, then what about a call to rollback()?

      One datapoint: We've seen Spotfire call setAutoCommit(false), issue a query, and call rollback() (presumably to make sure to avoid making unintended changes).

        Attachments

        1. DRILL-2782-1Hygiene.3.patch.txt
          6 kB
          Daniel Barclay
        2. DRILL-2782-2Core.3.patch.txt
          18 kB
          Daniel Barclay
        3. DRILL-2782-2Core.4.patch.txt
          22 kB
          Daniel Barclay

          Issue Links

            Activity

              People

              • Assignee:
                dsbos Daniel Barclay
                Reporter:
                dsbos Daniel Barclay
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: