eolivelli commented on code in PR #16468:
URL: https://github.com/apache/pulsar/pull/16468#discussion_r916766297
##########
pulsar-io/jdbc/core/src/main/java/org/apache/pulsar/io/jdbc/JdbcAbstractSink.java:
##########
@@ -214,11 +214,20 @@ private void flush() {
throw new IllegalArgumentException(msg);
}
}
- connection.commit();
+ if (!connection.getAutoCommit()) {
Review Comment:
in some JDBC drivers this "connection.getAutoCommit()" executes a RPC
(request/response cycle on the wire).
I suggest you to use the configuration entry "useTransactions" to decide to
call commit/rollback
--
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]