-
Notifications
You must be signed in to change notification settings - Fork 409
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
Mis-reuse StoragePool::max_data_page_id cause data corruption after changing tiflash replica number #8695
Comments
Setting tiflash replica to 0 will physically remove the data and IStorage instance in TiFlash after GC safepoint (since v7.2) tiflash/dbms/src/TiDB/Schema/SchemaBuilder.cpp Lines 377 to 392 in 824059f
And when re-creating the IStorage instance, its related StoragePool can not restore the correct max_data_id from tiflash/dbms/src/Storages/DeltaMerge/StoragePool.cpp Lines 638 to 646 in 824059f
tiflash/dbms/src/Storages/Page/V3/PageDirectory.cpp Lines 1342 to 1347 in 824059f
|
So when adding back TiFlash replica, TiFlash may reuse the data_page_id to create the same DMFile path in mark_cache. However, the mark_cache is invalid and they will lead to queries failure |
…ging tiflash replica number (pingcap#8698) close pingcap#8695
/found customer |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
New queries may failed with exception like
After restart, TiFlash may meet exception like
4. What is your TiFlash version? (Required)
v7.5.0
The text was updated successfully, but these errors were encountered: