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

Fix metadata corruption by cherry pick from tikv #4437

Closed
CalvinNeo opened this issue Mar 25, 2022 · 1 comment · Fixed by pingcap/tidb-engine-ext#53 or #4453
Closed

Fix metadata corruption by cherry pick from tikv #4437

CalvinNeo opened this issue Mar 25, 2022 · 1 comment · Fixed by pingcap/tidb-engine-ext#53 or #4453

Comments

@CalvinNeo
Copy link
Member

CalvinNeo commented Mar 25, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

As tikv/tikv#11526 describe

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

@CalvinNeo CalvinNeo added the type/bug The issue is confirmed as a bug. label Mar 25, 2022
@CalvinNeo CalvinNeo changed the title Fix Fix metadata corruption by cherry pick from tikv Mar 25, 2022
CalvinNeo added a commit to pingcap/tidb-engine-ext that referenced this issue Mar 28, 2022
Cherry pick to fix pingcap/tiflash#4437.

* add test case

Signed-off-by: Jay Lee <[email protected]>

* raftstore: set term when catch up logs for merge

Prepare merge may includes logs from different terms, which may be even
larger than the term of a follower that is lag behind. So when catching
up logs by commit merge, its term should also be set to get a correct
metadata.

Close tikv#11526.

Signed-off-by: Jay Lee <[email protected]>

* add log for becoming follower

Signed-off-by: Jay Lee <[email protected]>

* correct commit log check

Signed-off-by: Jay Lee <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>

Co-authored-by: Jay <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
@CalvinNeo CalvinNeo reopened this Mar 28, 2022
@VelocityLight
Copy link

update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment