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

br, after flashback, pitr restore data to downstram, data inconsistent with upstream #39602

Closed
seiya-annie opened this issue Dec 3, 2022 · 2 comments · Fixed by #39729
Closed
Assignees
Labels
affects-6.4 affects-6.5 component/br This issue is related to BR of TiDB. severity/critical type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1.install tidb cluster with tiflash, CDC node
2. start pitr task, CDC task, and set tiflash replica
3. prepare 300G data
4. run workload for 1 hour
5. flashback to 1 hour ago
6. restore data to downstream

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

flashback successfully
data in downstream is consistent with upstream

3. What did you see instead (Required)

MySQL [flashback]> admin check table user_data5 ;
ERROR 8134 (HY000): data inconsistency in table: user_data5, index: k_1, col: update_time, handle: "26883", index-values:"KindMysqlTime 2022-12-02 10:42:52" != record-values:"KindNull <nil>", compare err:<nil>
MySQL [flashback]> admin check table user_data6 ;
Query OK, 0 rows affected (0.84 sec)

MySQL [flashback]> admin check table user_data9 ;
ERROR 8134 (HY000): data inconsistency in table: user_data9, index: k_1, col: update_time, handle: "58386", index-values:"KindMysqlTime 2022-12-02 10:41:55" != record-values:"KindNull <nil>", compare err:<nil>
MySQL [flashback]> admin check table user_data10;
Query OK, 0 rows affected (2.18 sec)

in upstream:

MySQL [flashback]> select count(*) from user_data5 ;
+----------+
| count(*) |
+----------+
|   350000 |
+----------+
1 row in set (0.43 sec)

MySQL [flashback]> select count(*) from user_data9 ;
+----------+
| count(*) |
+----------+
|   350000 |
+----------+
1 row in set (0.37 sec)

in downstream:

MySQL [flashback]> select count(*) from user_data5 ;
+----------+
| count(*) |
+----------+
|   367630 |
+----------+
1 row in set (0.16 sec)
MySQL [flashback]> select count(*) from user_data9 ;
+----------+
| count(*) |
+----------+
|   361240 |
+----------+
1 row in set (0.16 sec)

4. What is your TiDB version? (Required)

[root@localhost zak]# ./br -V
Release Version: v6.5.0-alpha-201-g8f61a6fea
Git Commit Hash: 8f61a6f
Git Branch: fix-rewrite-shortvalue
Go Version: go1.19
UTC Build Time: 2022-12-02 10:26:54
Race Enabled: false

@seiya-annie seiya-annie added the type/bug The issue is confirmed as a bug. label Dec 3, 2022
@seiya-annie
Copy link
Author

[root@localhost zak]# nohup ./br restore point --pd=172.16.6.35:3679 --storage="s3://tmp/br-lt-log-backup-1201?access-key=minioadmin&secret-access-key=minioadmin&endpoint=http%3a%2f%2fminio.pingcap.net%3a9000&force-path-style=true" --restored-ts="2022-12-02 19:05:00+0800" --concurrency=64 --pitr-concurrency=128 --full-backup-storage="s3://tmp/backup-46-snapshot-20221201200000?access-key=minioadmin&secret-access-key=minioadmin&endpoint=http%3a%2f%2fminio.pingcap.net%3a9000&force-path-style=true" >> restore-46.log 2>&1 &

@seiya-annie
Copy link
Author

@seiya-annie seiya-annie added the component/br This issue is related to BR of TiDB. label Dec 3, 2022
@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 labels Dec 5, 2022
@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 labels Dec 5, 2022
ti-chi-bot added a commit to tikv/tikv that referenced this issue Dec 8, 2022
close #13909, ref pingcap/tidb#39602

GC would be skipped once the `ratio_threshold` is negative or infinity.

Signed-off-by: hillium <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
ti-chi-bot added a commit to tikv/tikv that referenced this issue Dec 8, 2022
ref #13904, close #13909, ref pingcap/tidb#39602

GC would be skipped once the `ratio_threshold` is negative or infinity.

Signed-off-by: hillium <[email protected]>

Co-authored-by: hillium <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.4 affects-6.5 component/br This issue is related to BR of TiDB. severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants