xtern commented on code in PR #1880:
URL: https://github.com/apache/ignite-3/pull/1880#discussion_r1164017548


##########
modules/jdbc/src/main/java/org/apache/ignite/internal/jdbc/JdbcConnection.java:
##########
@@ -367,6 +374,20 @@ public void rollback(Savepoint savepoint) throws 
SQLException {
         throw new SQLFeatureNotSupportedException("Savepoints are not 
supported.");
     }
 
+    /**
+     * Finish transaction.
+     *
+     * @param commit {@code True} to commit, {@code false} to rollback.
+     * @throws SQLException If failed.
+     */
+    private void finishTx(boolean commit) throws SQLException {
+        JdbcFinishTxResult res = handler().finishTxAsync(connectionId, 
commit).join();

Review Comment:
   In similar jdbc operations (connect, execute query, execute batch) we 
uninterruptibly wait for the result (using join()).
   I haven't been able to find how the jdbc driver is supposed to handle thread 
interruption, it is only suggested to use JdbcStatement#cancel for cancel 
queries.
   
   But speaking specifically about commit/rollback, I'm not sure, but it seems 
to me that the user should know for sure the result of these operations and it 
might be better to leave them uninterruptible.
   WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to