-
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.12][#4873] YSQL: Support backup/restore for multi-tablet …
…range-split relations Summary: In this backport diff, formatted string's type field for `yb_table_properties.num_tablets` is changed from `PRIu64` to `%u` because its type is `uint32_t` instead of `uint64_t` on this backport branch. The expected output files of test: TestYsqlDump are also changed accordingly based on branch 2.12. This test passed on Jenkins. After 96beb9e, restoring a backup will re-partition relations to match the splits from their actual tablet snapshots if they differ from the pre-created ones. As a result, even if the split information from the ysql_dump file is missing or not accurate, restore should go through correctly. Therefore, as a stop-gap fix for backup-restore make the error when dumping a multi-tablet range-split relation (table or index) just a warning instead. This diff also fixes an issue in TestYSQLRangeSplitConstraint index-data validation code. Previously that data read was actually using the table instead of the index. Fully supporting range-split tables in ysql_dump (SPLIT AT clause) is still needed for regular ysql_dump export flow and may also improve performance of restore. So this will be addressed in a follow-up commit. Original Commit: 3156825 Original Differential Revision: https://phabricator.dev.yugabyte.com/D15700 Test Plan: YBBackupTest.TestYSQLRangeSplitConstraint org.yb.pgsql.TestYsqlDump Reviewers: mihnea, jason Reviewed By: jason Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D15758
- Loading branch information
Showing
6 changed files
with
263 additions
and
21 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