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 10:36:03 UTC

[GitHub] [pulsar] coderzc commented on a diff in pull request #16468: [fix][pulsar-io] Add useTransactions config for JdbcSinkConfig

coderzc commented on code in PR #16468:
URL: https://github.com/apache/pulsar/pull/16468#discussion_r916691595


##########
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:
   Thanks, I was negligent.



-- 
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