eskabetxe commented on code in PR #2: URL: https://github.com/apache/flink-connector-jdbc/pull/2#discussion_r1475775129
########## .github/workflows/weekly.yml: ########## @@ -27,25 +27,13 @@ jobs: strategy: matrix: flink_branches: [{ - flink: 1.16-SNAPSHOT, - branch: main - }, { - flink: 1.17-SNAPSHOT, - branch: main - }, { flink: 1.18-SNAPSHOT, jdk: '8, 11, 17', branch: main }, { flink: 1.19-SNAPSHOT, jdk: '8, 11, 17, 21', branch: main - }, { - flink: 1.16.2, - branch: v3.1 - }, { - flink: 1.17.1, - branch: v3.1 }, { Review Comment: if we are bumping to 4.0.0, I agree. but any incompatible change between flink versions (not need break change, could be a new method we need to use as in this case) will cause that we made a major release?? ########## flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/datasource/connections/xa/PoolingXaConnectionProvider.java: ########## @@ -0,0 +1,207 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.connector.jdbc.datasource.connections.xa; + +import org.apache.flink.annotation.Internal; +import org.apache.flink.connector.jdbc.datasource.transactions.xa.exceptions.TransientXaException; +import org.apache.flink.util.function.ThrowingConsumer; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import javax.sql.XADataSource; +import javax.transaction.xa.Xid; + +import java.io.Serializable; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Collection; +import java.util.Deque; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Map; +import java.util.function.Supplier; + +import static org.apache.flink.util.ExceptionUtils.rethrow; +import static org.apache.flink.util.Preconditions.checkState; + +/** + * A "pooling" implementation of {@link XaConnectionProvider}. Some database implement XA such that + * one connection is limited to a single transaction. As a workaround, this implementation creates a + * new XA resource after each xa_start call is made (and associates it with the xid to commit + * later). + */ +@Internal +public class PoolingXaConnectionProvider implements XaConnectionProvider { + private static final long serialVersionUID = 1L; + + /** */ Review Comment: fixed -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org