-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Potential issue on crash after creating post-split tablets #8148
Labels
Comments
nimwijetunga
added a commit
that referenced
this issue
Oct 18, 2021
…lets Summary: We may create two tablet partitions with different split partition keys (upon a split request) if the master node crashes. Test Plan: Uses an integration test that: # Creates a single tablet and attempts to split it (which should fail because of a flag set in the test which crashes the master) # Tries to re-split the same tablet again (should succeed since the master does not crash) # Checks that once the split is complete the boundary is consistent between the two split tablets To run the test use the following command: ``` ./yb_build.sh -n 10 --cxx-test integration-tests_tablet-split-itest --gtest_filter TabletSplitExternalMiniClusterITest.CrashMasterCheckConsistentPartitionKeys ``` Reviewers: timur, rsami Reviewed By: timur, rsami Subscribers: bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D13359
Closed by commit: f9c8d2f |
jaki
added a commit
that referenced
this issue
Nov 2, 2021
…tore (2) Summary: Commit b14485a handles backup restore for YSQL when number of tablets in the external snapshot doesn't match that in the cluster. Do part 2 of handling cases where the number of tablets match but the partition boundaries don't. This may cost some performance because partitions need to be inspected for each YSQL table. Master branch commit f9c8d2f ([#8148] docdb: Potential issue on crash after creating post-split tablets) is not in this backport 2.8 branch. To clarify what that commit does, it changes the way yb-master chooses the split point: rather than take the midway point between start and end, use the middle based on data in the tablet. Therefore, ManualTabletSplit test is adjusted so that the split point is taken as the middle disregarding data. Original Commit: 96beb9e Original Differential Revision: https://phabricator.dev.yugabyte.com/D13300 Test Plan: New test: ./yb_build.sh --cxx-test tools_yb-backup-test_ent \ --gtest_filter YBBackupTest.TestYSQLManualTabletSplit Run other YSQL backup/restore tests, and make sure that partitions don't appear to mismatch (i.e. make sure master log doesn't have "Partition boundaries mismatch for table"). Reviewers: oleg Reviewed By: oleg Subscribers: bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D13731
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scenario:
split_key_1
+tablet_id
to split.CatalogManager::DoSplitTablet
is called on master sidesplit_key_1
.tablet_id
requires split, but this time it calculates differentsplit_key_2
(it can happen if we have workload running and distribution of keys changes between step 1 and this step).CatalogManager::DoSplitTablet
is called on master side withsplit_key_2
+tablet_id
.CatalogManager::DoSplitTablet
doesn't create new child tablets, because they are already created.CatalogManager::DoSplitTablet
still callsSendSplitTabletRequest
, but passing encoded and partition keys forsplit_key_2
instead ofsplit_key_1
.Expected result: Child tablets partition key boundary should match the split key that is used by tserver to do the actual tablet split.
Actual result: Child tablets will have partition key boundary based on
split_key_1
, but tserver will do the actual split based onsplit_key_2
.The text was updated successfully, but these errors were encountered: