flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

[Bug] Oracle cdc repeatedly consumes snapshot data and does not consume binlog data

Open GeniusTian opened this issue 3 years ago • 4 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Flink version

1.13.5

Flink CDC version

2.1.1

Database and its version

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
and 

Non-CDB

Minimal reproduce step

I follow the steps on the official website (https://ververica.github.io/flink-cdc-connectors/release-2.1/content/connectors/oracle-cdc.html), everything is ok

What did you expect to see?

I expect the oracle cdc consume snapshot data only once and continus consume binlog data

What did you see instead?

when I consume the oracle data with flink sql client, it return all null value, when I consume the oracle data with datastream api ,it consumes snapshot data repeatedly and does not consume binlog data, what happened?

Anything else?

no

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

GeniusTian avatar Mar 10 '23 09:03 GeniusTian

    This is the code: 
    Properties properties = new Properties();
    properties.put("database.tablename.case.insensitive","false");
    properties.setProperty("database.connection.adapter", "logminer");
    properties.setProperty("log.mining.strategy", "online_catalog");
    properties.setProperty("log.mining.continuous.mine", "true");
    SourceFunction<String> sourceFunction = OracleSource.<String>builder()
            .hostname("")
            .port(1521)
            .database("hzdb")
            .schemaList("hzuser")
            .tableList("hzuser.flink_test_cdc")
            .username("hzuser")
            .password("hzuser_2019")
            .deserializer(new JsonDebeziumDeserializationSchema())
            .startupOptions(StartupOptions.initial())
            .debeziumProperties(properties)
            .build();

    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    env.setParallelism(1);

    env.enableCheckpointing(10000);
    env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);

    env
            .addSource(sourceFunction)
            .print("cdc").setParallelism(1);

    env.execute();

GeniusTian avatar Mar 10 '23 10:03 GeniusTian

2.4.0 may fix this issue.

ruanhang1993 avatar Jun 30 '23 08:06 ruanhang1993

2.4.0 may fix this issue.

什么原因导致的

maohuajie1114 avatar Jul 06 '23 08:07 maohuajie1114

Closing this issue as it has been migrated to Apache Jira.

PatrickRen avatar Apr 09 '24 06:04 PatrickRen