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

TiDB CDC can not get change data

Open yujunyong opened this issue 2 years ago • 8 comments

Describe the bug(Please use English) A clear and concise description of what the bug is.

Environment :

  • Flink version : 1.14
  • Flink CDC version: 2.2.1
  • Database and version: 5.4.0

Taskmanager Log image

TiDB CDC started normal in a day, but can not get change data after a day. no error log in taskmanager. no error log in TiDB CDC Server. when 2022-06-14 16:32:32,858 INFO org.tikv.cdc.CDCClient [] - handle resolvedTs: 433899583002640387, regionId: 67814 log don't receive, change data not receive too.

yujunyong avatar Jun 15 '22 09:06 yujunyong

me too https://github.com/ververica/flink-cdc-connectors/issues/1252

RaiToKU avatar Jun 15 '22 10:06 RaiToKU

@yujunyong @RaiToKU https://github.com/ververica/flink-cdc-connectors/pull/1196 you can checkout pr and compile local.

GOODBOY008 avatar Jun 16 '22 09:06 GOODBOY008

I had the same situation. The synchronization will stop when the incremental synchronization reaches a certain value

Hugoincug avatar Jul 05 '22 13:07 Hugoincug

I had the same question. maybe the problem is similar to this issue:https://github.com/tikv/client-java/issues/628 tidb-cdc don't receive ChangeDataEvent from tikv store after several hours,because tikv region transfer leader. you can verify log of tikv store,if there are logs about "transfer leader" of your region_id

......
 ["try to transfer leader"] [to_peer="id: **** store_id: ***"] [from_peer="id: **** store_id: ****"] [region_id=****]
["transfer leader"] [peer="id: **** store_id: ****"] [peer_id=****] [region_id=***]
.....

xieyi888 avatar Jul 06 '22 03:07 xieyi888

I had the same question. maybe the problem is similar to this issue:tikv/client-java#628 tidb-cdc don't receive ChangeDataEvent from tikv store after several hours,because tikv region transfer leader. you can verify log of tikv store,if there are logs about "transfer leader" of your region_id

......
 ["try to transfer leader"] [to_peer="id: **** store_id: ***"] [from_peer="id: **** store_id: ****"] [region_id=****]
["transfer leader"] [peer="id: **** store_id: ****"] [peer_id=****] [region_id=***]
.....

When a region was created after start cdclient, this case also cann't capture data change.

GOODBOY008 avatar Jul 06 '22 05:07 GOODBOY008

I had the same question. maybe the problem is similar to this issue:tikv/client-java#628 tidb-cdc don't receive ChangeDataEvent from tikv store after several hours,because tikv region transfer leader. you can verify log of tikv store,if there are logs about "transfer leader" of your region_id

......
 ["try to transfer leader"] [to_peer="id: **** store_id: ***"] [from_peer="id: **** store_id: ****"] [region_id=****]
["transfer leader"] [peer="id: **** store_id: ****"] [peer_id=****] [region_id=***]
.....

When a region was created after start cdclient, this case also cann't capture data change.

it means cdcClient needs to be fix ?

Hugoincug avatar Jul 06 '22 07:07 Hugoincug

Is there a follow-up to this question?

MengXiangDing avatar Sep 06 '22 13:09 MengXiangDing

I had the same question. maybe the problem is similar to this issue:tikv/client-java#628 tidb-cdc don't receive ChangeDataEvent from tikv store after several hours,because tikv region transfer leader. you can verify log of tikv store,if there are logs about "transfer leader" of your region_id

......
 ["try to transfer leader"] [to_peer="id: **** store_id: ***"] [from_peer="id: **** store_id: ****"] [region_id=****]
["transfer leader"] [peer="id: **** store_id: ****"] [peer_id=****] [region_id=***]
.....

When a region was created after start cdclient, this case also cann't capture data change.

Will this issue be fixed in the future?

MengXiangDing avatar Sep 07 '22 09:09 MengXiangDing

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