pingcap / tiflow

This repo maintains DM (a data migration platform) and TiCDC (change data capture for TiDB)
Apache License 2.0
430 stars 286 forks source link

Encounter table data loss and CDC:ErrProcessorUnknown error for a sysbench test #3410

Closed zhaoxinyu closed 6 months ago

zhaoxinyu commented 3 years ago

What did you do?

  1. bootstrap a new TiDB cluster.
    tiup playground  --host 172.16.6.124 --db 3 --kv 3 --pd 3 --ticdc 3
  2. create a TiCDC change feed, and use MySQL as TiCDC's sink target.
    tiup ctl:v5.2.2 cdc changefeed create --pd=http://172.16.6.124:2379 --sink-uri="mysql://root:xxxxxx@127.0.0.1:3306" --changefeed-id="simple-replication-task2" --sort-engine="unified"
  3. create a database sbtest in TiDB and create one table for sbtest.
    sysbench /usr/local/share/sysbench/oltp_write_only.lua --db-driver=mysql --table_size=1000 --mysql-host=172.16.6.124 --mysql-port=4000 --mysql-db=sbtest --mysql-user=root --mysql-password= --tables=1 --threads=8 --time=3600 --report-interval=5 prepare

    image Now we can see table sbtest.sbtest1 is replicated to the downstream MySQL as expected. image

  4. execute the sysbench cleanup subcommand to remove the sbtest.sbtest1 table. image Now we can see table sbtest.sbtest1 is removed from the downstream MySQL as expected. image
  5. create 10 tables for sbtest. image
  6. only one empty table is created on the downstream MySQL side. image
  7. cdc changefeed query returns CDC:ErrProcessorUnknown error image

What did you expect to see?

After executing the second sysbench prepare command (see reproducing step 5), the whole 10 tables are supposed to be replicated to MySQL.

What did you see instead?

Only one table is created on the downstream MySQL side.

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

v5.2.2

TiCDC version (execute cdc version):

v5.2.2
asddongmen commented 6 months ago

Close it since it is stale.