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

Disordering events in a transaction with TiCDC may cause conflicts in downstream execution #9430

Closed
nongfushanquan opened this issue Jul 25, 2023 · 1 comment · Fixed by #9437
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. area/ticdc Issues or PRs related to TiCDC. severity/minor type/bug The issue is confirmed as a bug.

Comments

@nongfushanquan
Copy link
Contributor

What did you do?

create table cptesttable (k INT NOT NULL PRIMARY KEY, v INT NOT NULL, UNIQUE(v));
MySQL [cptestdb]> BEGIN;
MySQL [cptestdb]> INSERT INTO cptesttable VALUES (1, 1);
MySQL [cptestdb]> INSERT INTO cptesttable VALUES (2, 2);
MySQL [cptestdb]> COMMIT;
MySQL [cptestdb]> BEGIN;
MySQL [cptestdb]> UPDATE cptesttable SET v = 3 WHERE k = 2;
MySQL [cptestdb]> UPDATE cptesttable SET v = 2 WHERE k = 1;
MySQL [cptestdb]> COMMIT;

What did you expect to see?

MySQL [cptestdb]> UPDATE cptesttable SET v = 3 WHERE k = 2;
MySQL [cptestdb]> UPDATE cptesttable SET v = 2 WHERE k = 1;

What did you see instead?

MySQL [cptestdb]> UPDATE cptesttable SET v = 2 WHERE k = 1;
MySQL [cptestdb]> UPDATE cptesttable SET v = 3 WHERE k = 2;

Versions of the cluster

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

(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):

(paste TiKV version here)

TiCDC version (execute cdc version):
6.5 & 7.1

(paste TiCDC version here)
@nongfushanquan nongfushanquan added area/ticdc Issues or PRs related to TiCDC. type/bug The issue is confirmed as a bug. labels Jul 25, 2023
@nongfushanquan
Copy link
Contributor Author

/assign @sdojjy

@sdojjy sdojjy added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. severity/minor labels Aug 2, 2023
3AceShowHand pushed a commit to 3AceShowHand/tiflow that referenced this issue Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. area/ticdc Issues or PRs related to TiCDC. severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants