Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL sink will generate duplicated replace if batch-replace-enable is disabled #4501

Closed
amyangfei opened this issue Feb 5, 2022 · 0 comments · Fixed by #4502
Closed

MySQL sink will generate duplicated replace if batch-replace-enable is disabled #4501

amyangfei opened this issue Feb 5, 2022 · 0 comments · Fixed by #4502

Comments

@amyangfei
Copy link
Contributor

What did you do?

  • Create a changefeed with batch-replace-enable disabled
  • Run insert or update in upstream
  • MySQL sink will generate duplicated replace

What did you expect to see?

No response

What did you see instead?

For example

mysql [email protected]:test> insert into t2 values ();
Query OK, 1 row affected
Time: 0.005s
[2022/02/05 17:15:24.768 +08:00] [DEBUG] [mysql.go:722] ["prepare DMLs"] [rows="[{\"start-ts\":430978504702296065,\"commit-ts\":430978504702296066,\"row-id\":30004,\"table\":{\"db-name\":\"test\",\"tbl-name\":\"t2\",\"tbl-id\":57,\"is-partition\":false},\"table-info-version\":430978503889387522,\"replica-id\":0,\"columns\":[{\"name\":\"id\",\"type\":8,\"flag\":27,\"value\":30003}],\"pre-columns\":null}]"] [sqls="[\"REPLACE INTO `test`.`t2`(`id`) VALUES (?);\",\"REPLACE INTO `test`.`t2`(`id`) VALUES (?);\"]"] [values="[[30003],[30003]]"]
[2022/02/05 17:15:24.768 +08:00] [DEBUG] [mysql.go:566] ["exec row"] [sql="REPLACE INTO `test`.`t2`(`id`) VALUES (?);"] [args="[30003]"]
[2022/02/05 17:15:24.769 +08:00] [DEBUG] [mysql.go:566] ["exec row"] [sql="REPLACE INTO `test`.`t2`(`id`) VALUES (?);"] [args="[30003]"]
[2022/02/05 17:15:24.807 +08:00] [DEBUG] [mysql.go:593] ["Exec Rows succeeded"] [changefeed=test-cf] ["num of Rows"=1] [bucket=0]

Versions of the cluster

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

master@2022/02/05

TiCDC version (execute cdc version):

master@596f558

@amyangfei amyangfei added type/bug The issue is confirmed as a bug. component/sink Sink component. area/ticdc Issues or PRs related to TiCDC. labels Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant