Open davidkl97 opened 3 years ago
Your application is probably disabling auto-commit by calling connection.setAutoCommit(false)
. If using auto-commit, the client will create a new transaction for each query. In transaction mode, the application needs to call connection.rollback()
after a failure. However, it appears that rollback()
should clear the transaction ID after executing ROLLBACK
on the server side (regardless of whether that commands succeeds), which is likely the issue you are seeing.
Hey , I'm using the JDBC driver(358 version) bundled in Kafka connect and running scheduled queries again the trino server(358 version). At rare occasions, i could experience external failures in the queries im executing(might be a network issue or connector issue) which aborts the transaction at the server side but not in the client side. instead of trying to make a new transaction, the jdbc driver reflects the connection is valid but tries to use the expired transaction id.
i would expect a reflection of this failure on the client side also which could trigger to close connection or to restart a new transaction.
Any help would be appreciated :)
Thanks