-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2.18][#23047] docdb: Fix cotable ids in flushed frontier at…
… restore Summary: Original commit: 550458d / D36041 When restoring a snopshot of a colocated tablet to a new database/table group, all tables are re-created in the new database so that the cotable ids are different from those in the snapshot. At restore, the cotables in flushed frontiers should be updated to the ids of newly created tables, otherwise we will probably hit the following issue after restore: ``` 1. we have 3 sst files after restore 1.sst (smallest:old_id=0, largest:old_id=0) 2.sst (smallest:old_id=0, largest:old_id=0) 3.sst (smallest:old_id=0, largest:old_id=0) 2. compact 1.sst and 2.sst and generate 4.sst 3.sst (smallest:old_id=0, largest:old_id=0) 4.sst (smallest:new_id=1, largest:new_id=1) After compaction, schema packing with version 0 for new_id can be dropped because from frontier we can only find new_id=1 3. When compact 3.sst and 4.sst there are still rows with version 0 for old_id but schema version 0 has been GCed in step 2 ``` Jira: DB-11979 Test Plan: PackedRows/YBBackupTestWithPackedRowsAndColocation.*/1 CrossColocationTests/YBBackupCrossColocation.TestYSQLRestoreWithInvalidIndex/1 TableRewriteTests/YBBackupTestWithTableRewrite.TestYSQLBackupAndRestoreAfterRewrite/1 TableRewriteTests/YBBackupTestWithTableRewrite.TestYSQLBackupAndRestoreAfterFailedRewrite/1 Reviewers: sergei, zdrudi, mhaddad Reviewed By: zdrudi Subscribers: qhu, ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D36932
- Loading branch information
Showing
9 changed files
with
112 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters