You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink CDC Issue Import (Jira)" <ji...@apache.org> on 2024/03/20 09:20:00 UTC

[jira] [Commented] (FLINK-34773) [Bug][mysql-cdc] com.ververica.cdc.connectors.mysql.source.utils.StatementUtils#initStatement leads to uncommitted transactions

    [ https://issues.apache.org/jira/browse/FLINK-34773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828702#comment-17828702 ] 

Flink CDC Issue Import commented on FLINK-34773:
------------------------------------------------

Date: Mon Feb 20 17:34:07 CST 2023, Author: [lucifer-yqh|https://github.com/lucifer-yqh]

[code location|https://github.com/ververica/flink-cdc-connectors/blob/eb5610c29bf6deee9abc1f5a28208f0a0b02b99a/flink-connector-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/utils/StatementUtils.java#L237]

I am not sure if set auto-commit to false and never set back was intended . According to no isolation level required in jdbc connection, I will assume this is an issue.

> [Bug][mysql-cdc] com.ververica.cdc.connectors.mysql.source.utils.StatementUtils#initStatement leads to uncommitted transactions
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-34773
>                 URL: https://issues.apache.org/jira/browse/FLINK-34773
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>            Reporter: Flink CDC Issue Import
>            Priority: Major
>              Labels: github-import
>
> ### Search before asking
> - [X] I searched in the [issues|https://github.com/ververica/flink-cdc-connectors/issues] and found nothing similar.
> ### Flink version
> 1.16
> ### Flink CDC version
> 2.3
> ### Database and its version
> Mysql 8.0 official docker image
> ### Minimal reproduce step
> 1. Start flink-job with following config;
>  - long checkpoint interval 
>  - Mysql source with parallelism > 1 and initial mode.
> 2. Wait for snapshot read
> 3. Before checkpoint complete
> Several uncommitted transactions will be observed from mysql console. May cause SQL execution hang.
> ### What did you expect to see?
> No open transactions should be observed after snapshot read split finished. May cause SQL execution hang.
> ### What did you see instead?
> Several uncommitted transactions can be observed after snapshot read split finished. May cause SQL execution hang.
> ### Anything else?
> Not yet
> ### Are you willing to submit a PR?
> - [X] I'm willing to submit a PR!
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/apache/flink-cdc/issues/1926
> Created by: [lucifer-yqh|https://github.com/lucifer-yqh]
> Labels: bug, 
> Created at: Mon Feb 20 17:24:22 CST 2023
> State: open



--
This message was sent by Atlassian Jira
(v8.20.10#820010)