-
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.
[#10360] DST: PITR - Disable Tablet Splitting during PITR restores
Summary: Tablet Splitting during PITR restorations causes hindrances, leading to race conditions. This diff disables it during restores. When a restore request is received, we disable splitting for 10 mins and also wait for pending splits to complete before beginning restore. When restore completes, we re-enable splitting. 10 mins is an upper bound and we don't expect any type of restoration to take more than 10 mins. If restore finishes earlier then splitting is re-enabled as soon as restore finishes. We don't disable splitting indefinitely because it can happen that restore never completes and in such cases splitting will be disabled forever. This diff also fixes another issue for PITR+tablet splitting. One simple scenario to explain the issue: 1. Say you have a tablet - t1 2. Split t1 into t11 and t12, mark t1 as HIDDEN, t11 and t12 as RUNNING 3. After the retention period, DELETE t1 4. Restore to time after 2, in our current implementation we'll send a restore RPC to t1 also which has already been deleted Currently, we send `RESTORE_ON_TABLET` RPCs to DELETED/HIDDEN tablets that are a part of RUNNING tables. Test Plan: ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter YbAdminSnapshotScheduleTest.VerifyRestoreWithDeletedTablets ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter YbAdminSnapshotScheduleTest.SplitDisabledDuringRestore Reviewers: slingam, bogdan, sergei, asrivastava Reviewed By: asrivastava Subscribers: jenkins-bot, bogdan, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D17148
- Loading branch information
1 parent
beae963
commit 13736e1
Showing
21 changed files
with
401 additions
and
74 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
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
Oops, something went wrong.