From e8a3e33149d915d58c87b6cac9d89376c1c152e7 Mon Sep 17 00:00:00 2001 From: Yuhao Su <31772373+yuhao-su@users.noreply.github.com> Date: Mon, 20 May 2024 21:20:51 -0500 Subject: [PATCH] fix(connector): idle transaction `SHOW TRANSACTION ISOLATION LEVEL` when no sinked data (#16847) --- .../src/main/java/com/risingwave/connector/JDBCSink.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/connector-node/risingwave-sink-jdbc/src/main/java/com/risingwave/connector/JDBCSink.java b/java/connector-node/risingwave-sink-jdbc/src/main/java/com/risingwave/connector/JDBCSink.java index 64b2b7602e3b9..399a312758e3b 100644 --- a/java/connector-node/risingwave-sink-jdbc/src/main/java/com/risingwave/connector/JDBCSink.java +++ b/java/connector-node/risingwave-sink-jdbc/src/main/java/com/risingwave/connector/JDBCSink.java @@ -89,6 +89,8 @@ public JDBCSink(JDBCSinkConfig config, TableSchema tableSchema) { "JDBC connection: autoCommit = {}, trxn = {}", conn.getAutoCommit(), conn.getTransactionIsolation()); + // Commit the `getTransactionIsolation` + conn.commit(); jdbcStatements = new JdbcStatements(conn); } catch (SQLException e) {