-
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.
[#12211] docdb: Temporary disable tablet splitting for index tables w…
…ith range partitioning Summary: Issue #12190 gives a potential data loss, a temporary disabling for both dynamic and manual splitting for index tables with range partitioning is required at master server side. When #12190 and #12191 are done tablet splitting should be enabled for those tables. Additional tablet splitting disabling is added at tablet server side, other checks and cases will be covered in #12189. Additionally, an index versioning support is implemented by adding a new field `partition_key_version` into schema's `TableProperties` and `TablePropertiesPB` -- the default version should be updated in the context of #12190, after that tablet splitting becomes enabled automatically for index tables with range partitioning. Test Plan: Main: 1. unit test: ybd --cxx-test pgwrapper_pg_tablet_split-test --gtest_filter "PgTabletSplitTest.ManualSplitIndexTablet" 2. manual test: 2.1) create a cluster ``` ./bin/yb-ctl create --master_flags="enable_automatic_tablet_splitting=true,\ tablet_split_low_phase_shard_count_per_node=16,\ tablet_split_low_phase_size_threshold_bytes=13421" \ --tserver_flags="yb_num_shards_per_tserver=1" ``` 2.2) run `./bin/ysqlsh` and execute ``` create table employees(id int primary key, name text, description text); create index idx1 on employees(description ASC); ``` 2.3) open tablet server web ui and make sure only one tablet exists for index table 2.4) download `collect_insert_data.txt` from #10926 and rename to `collect_insert_data.py` 2.5) execute `./collect_insert_data.py` to generate sql script 2.6) execute `./bin/ysqlsh -f sql_data.sql` 2.7) make sure only one tablet still exists for index table, while the table has several tablets 2.8) flush `idx1` index tablet: `./bin/yb-ts-cli flush_tablet <UUID>` 2.9) try manual split: `./bin/yb-admin split_tablet -master_addresses localhost:7100 <UUID>` the following error should appear: ``` Error running split_tablet: Not implemented (yb/master/tablet_split_manager.cc:176): Unable to start split of tablet <UUID>: Tablet splitting is not supported for the index table "idx1" with table_id "000033e5000030008000000000004005". Please, rebuild the index! ``` 3. Additional tests should not give unexpected results: ybd --cxx-test tablet_tablet-split-test ybd --cxx-test integration-tests_tablet-split-itest ybd --cxx-test integration-tests_tablet_server-itest ybd --cxx-test integration-tests_cql-tablet-split-test ybd --cxx-test integration-xcluster-tablet-split-itest ybd --cxx-test common_schema-test --gtest_filter TestSchema.TestSchema ybd --cxx-test common_schema-test --gtest_filter TestSchema.TestCreateProjection ybd --cxx-test master_catalog_manager-test --gtest_filter "TestCatalogManager.CheckIfCanDeleteSingleTablet" ybd --cxx-test pgwrapper_pg_tablet_split-test --gtest_filter "PgTabletSplitTest.SplitDuringLongRunningTransaction" ybd --cxx-test pgwrapper_pg_mini-test --gtest_filter "PgMiniTest.TabletSplitSecondaryIndexYSQL" Reviewers: timur, rthallam Reviewed By: timur, rthallam Subscribers: zyu, ybase, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D16738
- Loading branch information
1 parent
2b7f5d1
commit 2ef55c8
Showing
23 changed files
with
460 additions
and
198 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
Oops, something went wrong.