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

flashback to transaction begin fail for "Duplicate entry '30004' for key 'GLOBAL_VARIABLES.PRIMARY'" #40477

Closed
Tracked by #40026
seiya-annie opened this issue Jan 10, 2023 · 3 comments · Fixed by #40460
Assignees
Labels
feature/developing the related feature is in development found/automation Found by automation tests severity/major sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@seiya-annie
Copy link

seiya-annie commented Jan 10, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

'CREATE TABLE t (a INT);'
'alter table t set tiflash replica 1'
'do sleep(10)'
'insert into t values(1),(1),(2);'
-----flashback target timestamp
'begin;'
'do sleep(4)'
'update t set a=111 where a=1;'
'commit;'
flashback cluster to timestamp '2023-01-10 21:41:13' --before "begin"
'do sleep(3)'
flashback cluster to timestamp '2023-01-10 21:41:13'

2. What did you expect to see? (Required)

flashback success

3. What did you see instead (Required)

(IntegrityError(1062, "Duplicate entry '30004' for key 'GLOBAL_VARIABLES.PRIMARY'")

4. What is your TiDB version? (Required)

[tidb@101 ~]$ /home/tidb/deploy/tidb-4000/bin/tidb-server -V
Release Version: v6.6.0-alpha
Edition: Community
Git Commit Hash: 7e64d04
Git Branch: heads/refs/tags/v6.6.0-alpha
UTC Build Time: 2023-01-05 14:32:46
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
[tidb@101 ~]$

@seiya-annie seiya-annie added type/bug This issue is a bug. sig/sql-infra SIG: SQL Infra severity/major feature/developing the related feature is in development labels Jan 10, 2023
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 labels Jan 10, 2023
@seiya-annie seiya-annie removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 labels Jan 10, 2023
@seiya-annie
Copy link
Author

tidb.log

@seiya-annie
Copy link
Author

@seiya-annie
Copy link
Author

another case reported "Duplicate entry '60002' for key 'tidb.PRIMARY'"
-tps-1331395-1-257.svc, port: 4000, username: root, password: , database: 0000__Flashback_func_005_JJLVDN
2023-01-09 16:23:39,758 ERROR [0000__Flashback-func-005][default.py:102] - test failed
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/utf/scheduler/default.py", line 90, in run
c.execute()
File "/usr/local/lib/python3.8/site-packages/utf/core/init.py", line 155, in execute
raise error
utf.core.StagedCase.Error: (IntegrityError(1062, "Duplicate entry '60002' for key 'tidb.PRIMARY'"), 'run')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/developing the related feature is in development found/automation Found by automation tests severity/major sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants