xtern commented on code in PR #1880:
URL: https://github.com/apache/ignite-3/pull/1880#discussion_r1173859140
##########
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:
I understood that you are suggesting to replace `join()` with `get()`, and I
indicated above why I am not sure that it is worth doing this specifically for
commit() and rollback().
As I see our jdbc driver implementation currently does not handle thread
interruptions at all (except client connect).
Are you suggesting to change all join() calls to get() there and wrap
InterruptedException in SqlException?
And as I pointed above, the jdbc specification does not describe
interruptionexception handling. The operation is expected to be aborted via
JdbcConnection#cancel.
--
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]