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

TiFlash can not prevent data being removed after FLASHBACK DATABASE #8450

Closed
JaySon-Huang opened this issue Dec 1, 2023 · 1 comment · Fixed by #8424
Closed

TiFlash can not prevent data being removed after FLASHBACK DATABASE #8450

JaySon-Huang opened this issue Dec 1, 2023 · 1 comment · Fixed by #8424

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Found by manual check.

tidb support FLASHBACK DATABASE DBName [TO newDBName] since v6.4.0 https://docs.pingcap.com/tidb/stable/sql-statement-flashback-database
However, tiflash did not notice that. And if a database is recovered by FLASHBACK DATABASE, tiflash can not prevent the data from being removed after gc-safepoint passed the previous DROP DATABASE is executed.

tidb issue: pingcap/tidb#20463

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

The data in TiFlash remain not removed after FLASHBACK DATABASE is executed even when gc-safepoint exceed

3. What did you see instead (Required)

The data in TiFlash is lost

4. What is your TiFlash version? (Required)

master, 7.5, 7.1, 6.5

@JaySon-Huang JaySon-Huang self-assigned this Dec 1, 2023
@ti-chi-bot ti-chi-bot bot closed this as completed in #8424 Dec 7, 2023
ti-chi-bot bot pushed a commit that referenced this issue Dec 7, 2023
ti-chi-bot bot pushed a commit that referenced this issue Dec 7, 2023
JaySon-Huang added a commit to ti-chi-bot/tiflash that referenced this issue Dec 7, 2023
@JaySon-Huang
Copy link
Contributor Author

JaySon-Huang commented Dec 8, 2023

known issue on release-6.5/release-7.1:

FLASHBACK DATABASE after the fixed versions on release-6.5/release-7.1 can not handle some corner cases, for example:

mysql> alter table d1.t3 add column b int;
mysql> insert into d1.t3 values(2,2);
mysql> alter table d1.t4 add column b int;
-- drop immediately after adding new columns
mysql> drop database d1;
mysql> flashback database d1 to d1_new

after flashback, it maybe not able to read t3/t4 because the add column DDLs are not able to be handled on tiflash
fullstack-test2-logs.tar.gz


The corner case can be handled properly on the release-7.5 and later

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