-
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.
[#8229] backup: repartition table if needed on YSQL restore
Summary: Sometimes, ysql_dump may not provide enough partitioning hints. Then, when importing snapshots, an error may be thrown for a mismatch on number of tablets between the snapshot table and ysql_dump-created table. Fix this by recreating partitions for the YSQL table in this case. Do not yet address the case where number of tablets are the same but partitions are split differently. In the implementation, do not worry about waiting for index tablets to finish creating on tservers since that isn't done for YCQL, which already recreates table, either. Add test YBBackupTest.TestYSQLChangeDefaultNumTablets and disabled test YBBackupTest.TestYSQLRangeSplitConstraint. Also, - add a VLOG for AsyncCreateReplica response - fix AddTabletUnlocked thread annotation from REQUIRES_SHARED to REQUIRES - fix ScopedTabletInfoCommitter to avoid double CommitMutation - move ScopedTabletInfoCommitter from anonymous namespace to catalog_entity_info.h so that ent::CatalogManager can use it - make ScopedTabletInfoCommitter a template class ScopedInfoCommitter so that it can later be used for other objects like TableInfo Do not close issue #8229 since there will be a part 2 handling partition schemas that differ on split points but have the same number of partitions. Test Plan: ./yb_build.sh --cxx-test tools_yb-backup-test_ent \ --gtest_filter YBBackupTest.TestYSQLChangeDefaultNumTablets Reviewers: nicolas, oleg Reviewed By: oleg Subscribers: ybase, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D13122
- Loading branch information
Showing
8 changed files
with
385 additions
and
70 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
Oops, something went wrong.