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

[mysql]binlog file validation error when switch mysql cluster

Open xiaoyu19950911 opened this issue 3 years ago • 1 comments

Describe the bug(Please use English) During binlogReader phase, it will checks whether the binlog file exists first.In master/slave mode,If I switch from cluster A to cluster B and restore from checkpoint,It will continue to run in GTID mode but valid binlog file error!

Environment :

  • Flink version : 1.13
  • Flink CDC version: 2.1
  • Database and version: 5.7

To Reproduce Steps to reproduce the behavior:

  1. Thes test data :cluster A(file = mysql-bin.000001) cluster B(file = mysql-bin.000002)
  2. The test code :switch from cluster A to cluster B and restore from checkpoint
  3. The error :Caused by: java.lang.IllegalStateException: The connector is trying to read binlog starting at Struct{version=1.5.0-LANCER-SNAPSHOT,connector=mysql,name=mysql_binlog_source,ts_ms=1648112699084,db=,server_id=0,file=mysql-bin.000001,pos=3311,row=0}, but this is no longer available on the server. Reconfigure the connector to use a snapshot when needed.

Additional Description image

xiaoyu19950911 avatar Mar 24 '22 09:03 xiaoyu19950911

is the problem solved,bro

rcf666 avatar Aug 25 '22 03:08 rcf666

Closing this issue because it was created before version 2.3.0 (2022-11-10). Please try the latest version of Flink CDC to see if the issue has been resolved. If the issue is still valid, kindly report it on Apache Jira under project Flink with component tag Flink CDC. Thank you!

PatrickRen avatar Feb 28 '24 15:02 PatrickRen