You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/08 09:35:21 UTC
[GitHub] [pulsar] eolivelli commented on a diff in pull request #16468: [fix][pulsar-io] Ignore SQLFeatureNotSupportedException if the JDBC connection doesn't support transactions
eolivelli commented on code in PR #16468:
URL: https://github.com/apache/pulsar/pull/16468#discussion_r916645122
##########
pulsar-io/jdbc/core/src/main/java/org/apache/pulsar/io/jdbc/JdbcAbstractSink.java:
##########
@@ -91,7 +92,11 @@ public void open(Map<String, Object> config, SinkContext sinkContext) throws Exc
Class.forName(JdbcUtils.getDriverClassName(jdbcSinkConfig.getJdbcUrl()));
connection = DriverManager.getConnection(jdbcSinkConfig.getJdbcUrl(), properties);
- connection.setAutoCommit(false);
+ try {
+ connection.setAutoCommit(false);
Review Comment:
if you cannot set "autoCommit" then you must not call commit or 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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org